Compare commits

...

197 Commits

Author SHA1 Message Date
Daniel Stenberg
042cc1f69e - David Kierznowski notified us about a security flaw
(http://curl.haxx.se/docs/adv_20090303.html also known as CVE-2009-0037) in
  which previous libcurl versions (by design) can be tricked to access an
  arbitrary local/different file instead of a remote one when
  CURLOPT_FOLLOWLOCATION is enabled. This flaw is now fixed in this release
  together this the addition of two new setopt options for controlling this
  new behavior:

  o CURLOPT_REDIR_PROTOCOLS controls what protocols libcurl is allowed to
  follow to when CURLOPT_FOLLOWLOCATION is enabled. By default, this option
  excludes the FILE and SCP protocols and thus you nee to explicitly allow
  them in your app if you really want that behavior.

  o CURLOPT_PROTOCOLS controls what protocol(s) libcurl is allowed to fetch
  using the primary URL option. This is useful if you want to allow a user or
  other outsiders control what URL to pass to libcurl and yet not allow all
  protocols libcurl may have been built to support.
2009-03-02 23:05:31 +00:00
Daniel Stenberg
90b804d3fa 7.19.4 won't get anything else 2009-03-02 10:43:46 +00:00
Daniel Stenberg
4bc603a0cc the Eiffel binding 2009-03-02 09:03:11 +00:00
Daniel Stenberg
6c3f74b946 nothing more left for 7.19.4, the issue #216 is moved to 7.19.5 since we're
too close to release now
2009-03-01 14:20:26 +00:00
Yang Tse
8d78a33e60 for portability reasons: s/inet_pton/Curl_inet_pton/ 2009-02-28 01:35:53 +00:00
Yang Tse
df07537ccf fix compiler warning 2009-02-28 01:11:57 +00:00
Daniel Stenberg
de25ed3f37 mention the '-o -' trick 2009-02-27 13:52:05 +00:00
Daniel Stenberg
40edf25866 217 - Dan Fandrich's "GnuTLS initialization thread safety"
218 - Senthil Raja Velu's "CURLOPT_LOCALPORT option broken", patch by
      Markus Koetter

Both are now committed
2009-02-27 12:11:08 +00:00
Daniel Stenberg
7b7db23633 - Senthil Raja Velu reported a problem when CURLOPT_INTERFACE and
CURLOPT_LOCALPORT were used together (the local port bind failed), and
  Markus Koetter provided the fix!
2009-02-27 12:07:14 +00:00
Daniel Stenberg
794b4da840 Indentation fixes, untabify and related whitespace-cleanup. No code changed. 2009-02-27 08:53:10 +00:00
Daniel Stenberg
e9ea3ba4a2 corrected and clarified the top comment 2009-02-25 12:51:39 +00:00
Daniel Stenberg
d207ea1652 - As Daniel Fandrich figured out, we must do the GnuTLS initing in the
curl_global_init() function to properly maintain the performing functions
  thread-safe. We've previously (28 April 2007) moved the init to a later time
  just to avoid it to fail very early when libgcrypt dislikes the situation,
  but that move was bad and the fix should rather be in libgcrypt or
  elsewhere.
2009-02-25 12:51:17 +00:00
Daniel Stenberg
625d06ac79 improved 2009-02-24 09:42:39 +00:00
Daniel Stenberg
3460225590 A handy little helper file for doing recursive diffs on curl source/build trees
without involving CVS:

diff -X diff-exclude -ru curl-old curl-patched
2009-02-24 09:35:55 +00:00
Daniel Stenberg
ea6531cf32 - Brian J. Murrell found out that Negotiate proxy authentication didn't work.
It happened because the code used the struct for server-based auth all the
  time for both proxy and server auth which of course was wrong.
2009-02-24 08:30:09 +00:00
Daniel Stenberg
2afb88e2ce 4.17 Non-functional connect timeouts 2009-02-23 21:21:00 +00:00
Daniel Stenberg
6c9f37d263 - After a bug reported by James Cheng I've made curl_easy_getinfo() for
CURLINFO_CONTENT_LENGTH_DOWNLOAD and CURLINFO_CONTENT_LENGTH_UPLOAD return
  -1 if the sizes aren't know. Previously these returned 0, make it impossible
  to detect the difference between actually zero and unknown.
2009-02-23 18:45:00 +00:00
Daniel Stenberg
735955282b For 7.19.5 (due to feature freeze)
220 - Take advantage of libssh2_version() that's been added for the upcoming
      1.1, to extract the run-time version number properly.
2009-02-23 16:28:51 +00:00
Yang Tse
dd056e54e2 adjustment for new Mac OS X framework build script 2009-02-23 14:34:40 +00:00
Yang Tse
f5548973ab Daniel Johnson provided a shell script that will perform all the steps needed
to build a Mac OS X fat ppc/i386 or ppc64/x86_64 libcurl.framework
2009-02-23 12:39:06 +00:00
Daniel Stenberg
07dc741e18 mention default port number 2009-02-23 10:40:36 +00:00
Daniel Stenberg
8b66981ce0 - I renamed everything in the windows builds files that used the name 'curllib'
to the proper 'libcurl' as clearly this caused confusion.
2009-02-23 09:36:54 +00:00
Daniel Stenberg
3a7e8c9f5f lzma compressed tarballs too for some testing, it does produce MUCH smaller
files
2009-02-23 09:36:08 +00:00
Yang Tse
fb90b43432 use the internal snprintf() function 2009-02-23 01:04:18 +00:00
Daniel Stenberg
0302c21253 mention 4 pending fixes/patches 2009-02-20 22:56:55 +00:00
Yang Tse
9182a46233 Mark Incley noticed VS2008 compilation halting when building for Windows 2000 2009-02-20 12:10:23 +00:00
Yang Tse
51b46f451f Do not halt compilation when using VS2008 to build a Windows 2000 target 2009-02-20 11:30:11 +00:00
Daniel Stenberg
11f3690201 clarified the FTP passive/active mode options somewhat 2009-02-20 09:14:25 +00:00
Daniel Stenberg
5784a37f91 the FTP multi interface bug 2009-02-20 08:19:19 +00:00
Daniel Stenberg
af91ff0e06 - Linus Nielsen Feltzing reported and helped me repeat and fix a problem with
FTP with the multi interface: when a transfer fails, like when aborted by a
  write callback, the control connection was wrongly closed and thus not
  re-used properly.

  This change is also an attempt to cleanup the code somewhat in this area, as
  now the FTP code attempts to keep (better) track on pending responses
  necessary to get read in ftp_done().
2009-02-20 08:16:03 +00:00
Daniel Stenberg
be3a78f583 The C++ binding home was changed 2009-02-19 18:49:03 +00:00
Daniel Stenberg
7f22da5230 verify that a 550-response for a RETR returns 78 but also that the control
connection is kept alive afterwards
2009-02-19 13:47:06 +00:00
Daniel Stenberg
5af0629ba5 - Patrik Thunstrom reported a problem and helped me repeat it. It turned out
libcurl did a superfluous 1000ms wait when doing SFTP downloads!

  We read data with libssh2 while doing the "DO" operation for SFTP and then
  when we were about to start getting data for the actual file part, the
  "TRANSFER" part, we waited for socket action (in 1000ms) before doing a
  libssh2-read. But in this case libssh2 had already read and buffered the
  data so we ended up always just waiting 1000ms before we get working on the
  data!
2009-02-19 10:36:20 +00:00
Daniel Stenberg
a776e5ad31 spell-fixed comments and other minor non-code edits 2009-02-18 19:31:55 +00:00
Patrick Monnerat
6e422c447a FTP downloads (i.e.: RETR) ending with code 550 now return error CURLE_REMOTE_FILE_NOT_FOUND instead of CURLE_FTP_COULDNT_RETR_FILE. 2009-02-18 11:40:16 +00:00
Patrick Monnerat
4608d0157e Continue sync work on OS400 specific code and RPG binding. 2009-02-17 16:16:07 +00:00
Daniel Stenberg
a24fe59ee4 - Kamil Dudka made NSS-powered builds compile and run again! 2009-02-17 12:18:34 +00:00
Daniel Stenberg
4ad296c60b - A second follow-up change by Andre Guibert de Bruet to fix a related memory
leak like that fixed on the 14th. When zlib returns failure, we need to
  cleanup properly before returning error.
2009-02-17 12:14:41 +00:00
Daniel Stenberg
0517fa153c three new CURLFTP_CREATE_DIR* symbols 2009-02-17 09:43:27 +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
Patrick Monnerat
1472be4d3e Preparation of imminent release: synchronizing OS400 wrappers + RPG binding to current state. 2009-02-16 15:33:17 +00:00
Gisle Vanem
8925527fef In MSVC9 'time_t' is a 64-bit quantity. This causes a truncation warning
when an 'int' is assigned to a 'time_t' variable. Hence redefine 'retry_time'
and 'retry_max' to 'time_t'.
2009-02-14 13:43:18 +00:00
Daniel Stenberg
8cdc220bc0 nah, use the simpler year - year range syntax only, no matter what emacs'
copyright-update script thinks
2009-02-14 09:12:55 +00:00
Daniel Stenberg
d315d41a12 - Andre Guibert de Bruet found and fixed a memory leak in the content encoding
code, which could happen on libz errors.
2009-02-14 09:09:09 +00:00
Daniel Stenberg
4f7687895d there is nothing left planned for next release, metalink experiments are post-
poned
2009-02-13 14:34:07 +00:00
Daniel Stenberg
07d46886df Anthony Bryan's letter=>symbol fixes 2009-02-13 09:12:52 +00:00
Yang Tse
b79c8f527f ignore 2009-02-13 06:34:44 +00:00
Yang Tse
0cf10ae4d7 Remove following files generated on previous buildconf run:
ltoptions.m4 ltsugar.m4 ltversion.m4 lt~obsolete.m4
2009-02-13 06:25:35 +00:00
Yang Tse
debe0b561d check for poll() as it is done for other functions 2009-02-13 05:49:58 +00:00
Dan Fandrich
9ddc7ad038 Fixed NTLM on curl-config --features with GnuTLS 2009-02-12 23:57:17 +00:00
Dan Fandrich
9a4c887c4a Added support for Digest and NTLM authentication using GnuTLS. 2009-02-12 20:48:40 +00:00
Daniel Stenberg
de41c6ef43 credit Jocelyn Jaubert for his bug report and associated work 2009-02-12 08:05:23 +00:00
Daniel Stenberg
002cf105c6 - CURLINFO_CONDITION_UNMET was added to allow an application to get to know if
the condition in the previous request was unmet. This is typically a time
  condition set with CURLOPT_TIMECONDITION and was previously not possible to
  reliably figure out. From bug report #2565128
  (http://curl.haxx.se/bug/view.cgi?id=2565128)
2009-02-11 21:47:14 +00:00
Daniel Stenberg
fb8fdf9273 Added docs/libcurl/symbols-in-versions 2009-02-10 13:06:25 +00:00
Daniel Stenberg
517b8ed057 completed the CURLPROXY_ collection 2009-02-10 12:52:09 +00:00
Daniel Stenberg
d3d7ed1766 include the symbols-in-versions file in the release archive 2009-02-10 12:39:26 +00:00
Daniel Stenberg
77fd094090 remove a trailing name from a comment 2009-02-10 12:34:41 +00:00
Daniel Stenberg
c65f9acdc7 introducing the symbols-in-versions file, in an effort to help app authors
to better know and track symbols in earlier libcurl versions
2009-02-10 12:33:10 +00:00
Daniel Stenberg
5c4cdcb2d5 mention when CURLOPT_ADDRESS_SCOPE was added 2009-02-10 12:32:12 +00:00
Daniel Stenberg
b1233c7e4d #45. libcurl built to support ipv6 uses getaddrinfo() to resolve host names.
getaddrinfo() sorts the response list

This isn't a libcurl bug since this is how getaddrinfo() is *supposed* to work!
Apparently you deal with this using the /etc/gai.conf file.
2009-02-09 16:09:45 +00:00
Daniel Stenberg
4ebe4b907b #53. SFTP busy-loop problem. should be fixed in 7.19.3 with libssh2 1.0 (or
later)
2009-02-09 16:08:08 +00:00
Daniel Stenberg
bf44d0f640 Moved Curl_strntoupper() to the rawstr.c file where the other raw string
functions are.
2009-02-07 22:53:37 +00:00
Daniel Stenberg
73cf99c052 214 - progress bar prefix, second try (for the curl tool)
patch declined
2009-02-07 22:47:07 +00:00
Dan Fandrich
44c02227e9 Mention the first release of CURLOPT_FTP_FILEMETHOD 2009-02-06 19:25:32 +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
Dan Fandrich
42d2353e74 Fixed a typo (spotted in the FreeBSD ports). 2009-02-04 23:40:57 +00:00
Dan Fandrich
4b441ebac5 Don't add the standard /usr/lib or /usr/include paths to LDFLAGS and CPPFLAGS
(respectively) when --with-ssl=/usr is used (patch based on FreeBSD).
2009-02-04 23:33:34 +00:00
Daniel Stenberg
01140217f5 206 - A. Craig West's CURLOPT_HTTP_VERSION change for CONNECT
applied!
2009-02-04 21:22:13 +00:00
Daniel Stenberg
71f3877f3a - Hidemoto Nakada provided a small fix that makes it possible to get the
CURLINFO_CONTENT_LENGTH_DOWNLOAD size from file:// "transfers" with
  CURLOPT_NOBODY set true.
2009-02-03 22:28:41 +00:00
Phil Blundell
83d135f990 * February 3 2009 (Phil Blundell)
- If the server returns garbage or nothing at all in response to an AAAA query,
  go on and ask for A records anyway.
2009-02-03 14:38:09 +00:00
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
Daniel Stenberg
a2256e899b - ares_gethostbyname() now accepts 'AF_UNSPEC' as a family for resolving
either AF_INET6 or AF_INET. It works by accepting any of the looksups in the
  hosts file, and it resolves the AAAA field with a fallback to A.
2009-01-31 20:17:41 +00:00
Daniel Stenberg
8b6805572a - Scott Cantor filed bug report #2550061
(http://curl.haxx.se/bug/view.cgi?id=2550061) mentioning that I failed to
  properly make sure that the VC9 makefiles got included in the latest
  release. I've now fixed the release script and verified it so next release
  will hopefully include them properly!
2009-01-31 18:38:41 +00:00
Daniel Stenberg
607253c2d0 Truly make sure that the vc8 and vc9 makefiles that are generated get included
in the release archive - by using our .dist suffix trick.
2009-01-30 22:32:13 +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
Dan Fandrich
5c9fff9c6e Mentioned some other characters that may need escaping on the curl command
line and fixed a few typos.
2009-01-30 18:28:29 +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
bb86462ed7 wrap line at col 80 2009-01-26 14:37:29 +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
Gunter Knauf
f29e383575 added CURLX_ONES again to object list for dynamic linking. 2009-01-26 07:33:29 +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
ddd3fe5948 Improved the title and keywords 2009-01-21 04:46:13 +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
Dan Fandrich
6bb9ef8de4 Call setlocale() for libtest tests to test the effects of locale-induced
libc changes on libcurl.
2009-01-21 04:30:05 +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
0e6ed13454 7.19.3 is out now 2009-01-19 11:50:31 +00:00
Daniel Stenberg
b914f45e9e 700 friendly contributors after the new ones in 7.19.3 were added 2009-01-19 10:25:47 +00:00
Daniel Stenberg
3ed66094e8 17 new contributors from the 7.19.3 release 2009-01-19 10:24:19 +00:00
Daniel Stenberg
718004d9b5 start over on our journey towards 7.19.4... 2009-01-19 10:11:25 +00:00
Daniel Stenberg
1dc54324f4 time to release 2009-01-19 09:59:20 +00:00
Gisle Vanem
89ecf4ac01 fopen() returns error in 'errno' even on Windows.
So don't use ERRNO (GetLastError()). Trimmed trailing
blanks.
2009-01-18 17:03:31 +00:00
Gisle Vanem
d42eac4287 Constified some arguments in local functions. 2009-01-18 16:33:10 +00:00
Gunter Knauf
3fa6c51bb1 fixed global copyright. 2009-01-17 14:56:33 +00:00
Daniel Stenberg
37c5250e03 - Andrew de los Reyes fixed curlbuild.h for "generic" gcc builds on PPC, both
32 bit and 64 bit.
2009-01-16 08:36:40 +00:00
Dan Fandrich
0d3bb93ce8 Add steps needed for zlib support under Minix 2009-01-15 08:49:22 +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
7ac16811cc a bunch of minor updates 2009-01-14 22:52:18 +00:00
Daniel Stenberg
29b6a732f3 - ares.h no longer uses the HAVE_STRUCT_IN6_ADDR define check, but instead it
now declares the private struct ares_in6_addr for all systems instead of
  relying on one possibly not present in the system.
2009-01-14 13:08:50 +00:00
Daniel Stenberg
3dcd6bc597 213 - bug #2501457 "Timeouts not working with curl_multi_socket_action()" -
now put in KNOWN_BUGS as entry #62
2009-01-13 23:45:24 +00:00
Daniel Stenberg
1342f5d592 62. CURLOPT_TIMEOUT does not work properly with the regular multi and
multi_socket interfaces. The work-around for apps is to simply remove the
  easy handle once the time is up. See also:
  http://curl.haxx.se/bug/view.cgi?id=2501457
2009-01-13 23:43:23 +00:00
Daniel Stenberg
8fbfd5916d Karl Moerder removed wsock32.lib from the vc9 makefiles 2009-01-13 23:29:56 +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
0761e60a4a Stefan Teleman's curlbuild.h fix for SunPro compilers 2009-01-13 22:05:48 +00:00
Daniel Stenberg
af96c8304f oops, the previous wasn't meant to get committed but since I did it I thought
I'd just as well enumerate the remainder and commit a "proper" looking one
2009-01-13 22:04:43 +00:00
Daniel Stenberg
0de0e95020 - Stefan Teleman brought a patch to fix the default curlbuild.h file for the
SunPro compilers.
2009-01-13 22:01:39 +00:00
Phil Blundell
35d8fb0501 - ares__send_query() now varies the retry timeout pseudo-randomly to avoid
packet storms when several queries were started at the same time.
2009-01-13 11:51:04 +00:00
Daniel Stenberg
87c71953be spell-checked a bunch of comments 2009-01-13 06:44:03 +00:00
Daniel Stenberg
79a91b8168 make this example not only replace an internal header but also add a totally
new and non-standard one
2009-01-12 21:29:23 +00:00
Daniel Stenberg
2f9038bf62 Mohun Biswas clarified 2009-01-12 21:22:51 +00:00
Daniel Stenberg
4d50ca4e21 bump year 2009-01-11 23:48:20 +00:00
Daniel Stenberg
a1077d0970 changed the wording to possibly make some sense 2009-01-11 23:47:01 +00:00
Daniel Stenberg
b9fdc0c251 - Based on bug report #2498665 (http://curl.haxx.se/bug/view.cgi?id=2498665)
by Daniel Black, I've now added magic to the configure script that makes it
  use pkg-config to detect gnutls details as well if the existing method
  (using libgnutls-config) fails. While doing this, I cleaned up and unified
  the pkg-config usage when detecting openssl and nss as well.
2009-01-11 23:41:50 +00:00
Daniel Stenberg
f471b4836f credit Karl Moerder properly 2009-01-11 22:05:38 +00:00
Daniel Stenberg
32b75d1b69 - Phil Blundell added the internal function ares__expand_name_for_response()
that is now used by the ares_parse_*_reply() functions instead of the
  ares_expand_name() simply to easier return ARES_EBADRESP for the cases where
  the name expansion fails as in responses that really isn't expected.
2009-01-11 13:49:13 +00:00
Daniel Stenberg
f7e3bd28b4 - Karl M brought the patch that creates vc9 Makefiles, and I made 'maketgz'
now use the actual makefile targets to do the VC8 and VC9 makefiles.
2009-01-11 13:34:05 +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
Daniel Stenberg
0090099565 Only care about the first line of libtool --version as otherwise this script
get fooled by libtool 2, and at least libtool 1.5.2x do output the interesting
version string in the first line.
2009-01-08 22:53:37 +00:00
Daniel Stenberg
2ed23cb50d "204 - Rob C's NSS fix" is done and since we enter feature freeze now I moved
the remaining three issues to next release since they are about new things and
not just fixing bugs
2009-01-08 10:32:54 +00:00
Dan Fandrich
a97ab4f933 Added a few more issues 2009-01-08 01:09:29 +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
14b6cc4e22 Always use nocheck="yes" for consistency 2009-01-07 21:57:26 +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
Daniel Stenberg
1f4b8da60a four fresh items to deal with! 2009-01-06 22:30:40 +00:00
Daniel Stenberg
9af4cf219e - 'reconf' is removed since we rather have users use 'buildconf' 2009-01-01 20:50:59 +00:00
Daniel Stenberg
cf4b88fcc4 credit Bas 2008-12-31 20:36:08 +00:00
Daniel Stenberg
2215a9a181 - Bas Mevissen reported http://curl.haxx.se/bug/view.cgi?id=2479030 pointing
out that 'reconf' didn't properly point out the m4 subdirectory when running
  aclocal.
2008-12-31 20:35:46 +00:00
Gunter Knauf
aa32f61ce7 sync'd address with other tests. 2008-12-30 15:33:09 +00:00
Gunter Knauf
8266727062 trial with an address which has a valid domain part but invalid host to avoid dns redirections. 2008-12-30 09:16:38 +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
9aea3e265d further clarifcation based on input from Anthony Bryan 2008-12-29 21:26:11 +00:00
Daniel Stenberg
59227bf075 - Peter Korsgaard fixed building libcurl with "configure --with-ssl
--disable-verbose".
2008-12-28 22:00:36 +00:00
Daniel Stenberg
f61cfc5931 Anthony Bryan's man page cleanup in language and spelling 2008-12-28 21:56:56 +00:00
Daniel Stenberg
27b8a5fd84 Anthony Bryan reported quirks, I updated 2008-12-28 21:43:34 +00:00
Daniel Stenberg
60ff74140e Anthony Bryan reported and I corrected two typos. 2008-12-28 21:35:53 +00:00
Daniel Stenberg
4f0a7170af The CURLOPT_KRBLEVEL description wasn't properly formatted and thus was
corrupted in ouputs. Another report from Anthony Bryan.
2008-12-28 21:31:55 +00:00
Daniel Stenberg
6d2ff9d2a7 Anthony Bryan reported this outputs wrong in the PDF and I've now tried to
escape these letters what I think is the correct way.
2008-12-28 21:29:13 +00:00
Gunter Knauf
122b0bfe82 silent 'unused' warnings. 2008-12-28 05:49:39 +00:00
Daniel Stenberg
3eae7695fc libssh2 0.19 became 1.0 instead 2008-12-27 23:25:31 +00:00
Gunter Knauf
6efde61227 added check for sin6_scope_id member in struct sockaddr_in6. 2008-12-27 04:30:36 +00:00
Daniel Stenberg
1c48124db4 193 removed, no work has been started on this and I personally don't care that
much about it
2008-12-25 15:09:18 +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
8a335ee7fd 197 - IIS-bug in Digest
The curl tool parts are postponed to a later time

201 - "bug: header data output to the body callback function after set header"
 Was probably not a bug, I asked about it but I didn't get any response.

202 - "hangs up of application above libcurl" - problems with the multi_socket
 Fixes from Igor have been committed and there's currently no pending ones.
2008-12-20 22:10:42 +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
19c9b7c803 remove outdated stuff 2008-12-20 17:16:45 +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
000a13e21a expand the CURLOPT_POSTREDIR explanation 2008-12-19 19:03:55 +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
bd55ab05bd Added the use of Watt-32 tcp/ip stack for Win32 targets. 2008-12-16 08:59:45 +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
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
79b7575fd8 196 is gone 2008-12-12 12:38:47 +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
5f0a3797c9 credit Mark Karpeles for his report and work 2008-12-12 08:36:56 +00:00
Yang Tse
2d2c53d20e Patrick Monnerat fixed a build regression, introduced in 7.19.2, affecting
OS/400 compilations with IPv6 enabled.
2008-12-12 03:24:59 +00:00
Daniel Stenberg
02ca14fd0e Removed 200 as it wasn't a bug after all
Added 203 "dns cache memory leak and TTL failure after failed conn"
2008-12-11 23:55:20 +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
Dan Fandrich
4607dfe257 Mention what makes this test special 2008-12-11 03:01:38 +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
4ed64fd5ee use the new URL 2008-12-09 22:49:51 +00:00
Daniel Stenberg
21700ae515 start over on the 1.6.1 release... 2008-12-09 22:41:36 +00:00
222 changed files with 6944 additions and 4470 deletions

438
CHANGES
View File

@@ -6,6 +6,444 @@
Changelog
Version 7.19.4 (3 March 2009)
Daniel Stenberg (3 Mar 2009)
- David Kierznowski notified us about a security flaw
(http://curl.haxx.se/docs/adv_20090303.html also known as CVE-2009-0037) in
which previous libcurl versions (by design) can be tricked to access an
arbitrary local/different file instead of a remote one when
CURLOPT_FOLLOWLOCATION is enabled. This flaw is now fixed in this release
together this the addition of two new setopt options for controlling this
new behavior:
o CURLOPT_REDIR_PROTOCOLS controls what protocols libcurl is allowed to
follow to when CURLOPT_FOLLOWLOCATION is enabled. By default, this option
excludes the FILE and SCP protocols and thus you nee to explicitly allow
them in your app if you really want that behavior.
o CURLOPT_PROTOCOLS controls what protocol(s) libcurl is allowed to fetch
using the primary URL option. This is useful if you want to allow a user or
other outsiders control what URL to pass to libcurl and yet not allow all
protocols libcurl may have been built to support.
Daniel Stenberg (27 Feb 2009)
- Senthil Raja Velu reported a problem when CURLOPT_INTERFACE and
CURLOPT_LOCALPORT were used together (the local port bind failed), and
Markus Koetter provided the fix!
Daniel Stenberg (25 Feb 2009)
- As Daniel Fandrich figured out, we must do the GnuTLS initing in the
curl_global_init() function to properly maintain the performing functions
thread-safe. We've previously (28 April 2007) moved the init to a later time
just to avoid it to fail very early when libgcrypt dislikes the situation,
but that move was bad and the fix should rather be in libgcrypt or
elsewhere.
Daniel Stenberg (24 Feb 2009)
- Brian J. Murrell found out that Negotiate proxy authentication didn't work.
It happened because the code used the struct for server-based auth all the
time for both proxy and server auth which of course was wrong.
Daniel Stenberg (23 Feb 2009)
- After a bug reported by James Cheng I've made curl_easy_getinfo() for
CURLINFO_CONTENT_LENGTH_DOWNLOAD and CURLINFO_CONTENT_LENGTH_UPLOAD return
-1 if the sizes aren't know. Previously these returned 0, make it impossible
to detect the difference between actually zero and unknown.
Yang Tse (23 Feb 2009)
- Daniel Johnson provided a shell script that will perform all the steps needed
to build a Mac OS X fat ppc/i386 or ppc64/x86_64 libcurl.framework
Daniel Stenberg (23 Feb 2009)
- I renamed everything in the windows builds files that used the name 'curllib'
to the proper 'libcurl' as clearly this caused confusion.
Yang Tse (20 Feb 2009)
- Do not halt compilation when using VS2008 to build a Windows 2000 target.
Daniel Stenberg (20 Feb 2009)
- Linus Nielsen Feltzing reported and helped me repeat and fix a problem with
FTP with the multi interface: when a transfer fails, like when aborted by a
write callback, the control connection was wrongly closed and thus not
re-used properly.
This change is also an attempt to cleanup the code somewhat in this area, as
now the FTP code attempts to keep (better) track on pending responses
necessary to get read in ftp_done().
Daniel Stenberg (19 Feb 2009)
- Patrik Thunstrom reported a problem and helped me repeat it. It turned out
libcurl did a superfluous 1000ms wait when doing SFTP downloads!
We read data with libssh2 while doing the "DO" operation for SFTP and then
when we were about to start getting data for the actual file part, the
"TRANSFER" part, we waited for socket action (in 1000ms) before doing a
libssh2-read. But in this case libssh2 had already read and buffered the
data so we ended up always just waiting 1000ms before we get working on the
data!
Patrick Monnerat (18 Feb 2009)
- FTP downloads (i.e.: RETR) ending with code 550 now return error
CURLE_REMOTE_FILE_NOT_FOUND instead of CURLE_FTP_COULDNT_RETR_FILE.
Daniel Stenberg (17 Feb 2009)
- Kamil Dudka made NSS-powered builds compile and run again!
- A second follow-up change by Andre Guibert de Bruet to fix a related memory
leak like that fixed on the 14th. When zlib returns failure, we need to
cleanup properly before returning error.
- 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.
Daniel Stenberg (14 Feb 2009)
- Andre Guibert de Bruet found and fixed a memory leak in the content encoding
code, which could happen on libz errors.
Daniel Fandrich (12 Feb 2009)
- Added support for Digest and NTLM authentication using GnuTLS.
Daniel Stenberg (11 Feb 2009)
- CURLINFO_CONDITION_UNMET was added to allow an application to get to know if
the condition in the previous request was unmet. This is typically a time
condition set with CURLOPT_TIMECONDITION and was previously not possible to
reliably figure out. From bug report #2565128
(http://curl.haxx.se/bug/view.cgi?id=2565128) filed by Jocelyn Jaubert.
Daniel Fandrich (4 Feb 2009)
- Don't add the standard /usr/lib or /usr/include paths to LDFLAGS and CPPFLAGS
(respectively) when --with-ssl=/usr is used (patch based on FreeBSD).
- 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.
Daniel Stenberg (3 Feb 2009)
- Hidemoto Nakada provided a small fix that makes it possible to get the
CURLINFO_CONTENT_LENGTH_DOWNLOAD size from file:// "transfers" with
CURLOPT_NOBODY set true.
Daniel Stenberg (2 Feb 2009)
- 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!
- 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.
Daniel Stenberg (31 Jan 2009)
- 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 with
this setup since it now parses the "::1 ip6-localhost" line fine in my
/etc/hosts file!
Daniel Stenberg (30 Jan 2009)
- Scott Cantor filed bug report #2550061
(http://curl.haxx.se/bug/view.cgi?id=2550061) mentioning that I failed to
properly make sure that the VC9 makefiles got included in the latest
release. I've now fixed the release script and verified it so next release
will hopefully include them properly!
Daniel Fandrich (30 Jan 2009)
- Fixed --disable-proxy for FTP and SOCKS. Thanks to Daniel Egger for
reporting.
Yang Tse (29 Jan 2009)
- 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.
Daniel Stenberg (28 Jan 2009)
- 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.
Daniel Stenberg (26 Jan 2009)
- 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.
- 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.
- 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.
- 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.
Daniel Fandrich (20 Jan 2009)
- Call setlocale() for libtest tests to test the effects of locale-induced
libc changes on libcurl.
- 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 1091 through 1094 to test various combinations
of ;type= and ;mode= URLs that could potentially fail in the Turkish
locale.
Daniel Stenberg (20 Jan 2009)
- 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).
Version 7.19.3 (19 January 2009)
Daniel Stenberg (16 Jan 2009)
- Andrew de los Reyes fixed curlbuild.h for "generic" gcc builds on PPC, both
32 bit and 64 bit.
Daniel Stenberg (15 Jan 2009)
- Tim Ansell fixed a compiler warning in lib/cookie.c
Daniel Stenberg (14 Jan 2009)
- Grant Erickson fixed timeouts for TFTP such that specifying a
connect-timeout, a max-time or both options work correctly and as expected
by passing the correct boolean value to Curl_timeleft via the
'duringconnect' parameter.
With this small change, curl TFTP now behaves as expected (and likely as
originally-designed):
1) For non-existent or unreachable dotted IP addresses:
a) With no options, follows the default curl 300s timeout...
b) With --connect-timeout only, follows that value...
c) With --max-time only, follows that value...
d) With both --connect-timeout and --max-time, follows the smaller value...
and times out with a "curl: (7) Couldn't connect to server" error.
2) For transfers to/from a valid host:
a) With no options, follows default curl 300s timeout for the
first XRQ/DATA/ACK transaction and the default TFTP 3600s
timeout for the remainder of the transfer...
b) With --connect-time only, follows that value for the
first XRQ/DATA/ACK transaction and the default TFTP 3600s
timeout for the remainder of the transfer...
c) With --max-time only, follows that value for the first
XRQ/DATA/ACK transaction and for the remainder of the
transfer...
d) With both --connect-timeout and --max-time, follows the former
for the first XRQ/DATA/ACK transaction and the latter for the
remainder of the transfer...
and times out with a "curl: (28) Timeout was reached" error as
appropriate.
Daniel Stenberg (13 Jan 2009)
- Michael Wallner fixed a NULL pointer deref when calling
curl_easy_setup(curl, CURLOPT_COOKIELIST, "SESS") on a CURL handle with no
cookies data.
- Stefan Teleman brought a patch to fix the default curlbuild.h file for the
SunPro compilers.
Daniel Stenberg (12 Jan 2009)
- Based on bug report #2498665 (http://curl.haxx.se/bug/view.cgi?id=2498665)
by Daniel Black, I've now added magic to the configure script that makes it
use pkg-config to detect gnutls details as well if the existing method
(using libgnutls-config) fails. While doing this, I cleaned up and unified
the pkg-config usage when detecting openssl and nss as well.
Daniel Stenberg (11 Jan 2009)
- Karl Moerder brought the patch that creates vc9 Makefiles, and I made
'maketgz' now use the actual makefile targets to do the VC8 and VC9
makefiles.
Daniel Stenberg (10 Jan 2009)
- 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.
Daniel Fandrich (7 Jan 2009)
- 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
Daniel Stenberg (7 Jan 2009)
- 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.
Daniel Stenberg (1 Jan 2009)
- 'reconf' is removed since we rather have users use 'buildconf'
Daniel Stenberg (31 Dec 2008)
- Bas Mevissen reported http://curl.haxx.se/bug/view.cgi?id=2479030 pointing
out that 'reconf' didn't properly point out the m4 subdirectory when running
aclocal.
Daniel Stenberg (29 Dec 2008)
- 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.
Phil provided his own patch to this problem that while it seemed to work
wasn't complete and thus I wrote my own fix to the problem.
Daniel Stenberg (28 Dec 2008)
- Peter Korsgaard fixed building libcurl with "configure --with-ssl
--disable-verbose".
- Anthony Bryan fixed more language and spelling flaws in man pages.
Daniel Stenberg (22 Dec 2008)
- Given a recent enough libssh2, libcurl can now seek/resume with SFTP even
on file indexes beyond 2 or 4GB.
- Anthony Bryan provided a set of patches that cleaned up manual language,
corrected spellings and more.
Daniel Stenberg (20 Dec 2008)
- 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.
Daniel Stenberg (19 Dec 2008)
- 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.
- 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.
Daniel Stenberg (17 Dec 2008)
- 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.
Gisle Vanem (16 Dec 2008)
- Added the possibility to use the Watt-32 tcp/ip stack under Windows.
The change simply involved adding a USE_WATT32 section in the
config-win32.h files (under ./lib and ./src). This section disables
the use of any Winsock headers.
Daniel Stenberg (16 Dec 2008)
- libssh2_sftp_last_error() was wrongly used at some places in libcurl which
made libcurl sometimes not properly abort problematic SFTP transfers.
Daniel Stenberg (12 Dec 2008)
- 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.
Yang Tse (12 Dec 2008)
- Patrick Monnerat fixed a build regression, introduced in 7.19.2, affecting
OS/400 compilations with IPv6 enabled.
Daniel Stenberg (12 Dec 2008)
- Mark Karpeles filed bug report #2416182 titled "crash in ConnectionExists
when using duphandle+curl_mutli"
(http://curl.haxx.se/bug/view.cgi?id=2416182) which 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.
Daniel Stenberg (11 Dec 2008)
- 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.
Daniel Stenberg (11 Dec 2008)
- 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.
(note that there's no way to activate this with the curl tool yet)
Daniel Fandrich (9 Dec 2008)
- Added test cases 1089 and 1090 to test --write-out after a redirect to
test a report that the size didn't work, but these test cases pass.

View File

@@ -1,6 +1,6 @@
COPYRIGHT AND PERMISSION NOTICE
Copyright (c) 1996 - 2008, Daniel Stenberg, <daniel@haxx.se>.
Copyright (c) 1996 - 2009, Daniel Stenberg, <daniel@haxx.se>.
All rights reserved.

49
MacOSX-Framework Executable file
View File

@@ -0,0 +1,49 @@
#!/bin/bash
# This script performs all of the steps needed to build a 32 bit
# universal binary libcurl.framework for Mac OS X 10.4 or greater.
VERSION=`/usr/bin/sed -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' include/curl/curlver.h`
SDK='/Developer/SDKs/MacOSX10.4u.sdk'
MINVER='-mmacosx-version-min=10.4'
ARCHES='-arch ppc -arch i386'
# Use these values instead to produce a 64 bit framework that only works on 10.5.
# You can't currently build a combined 32/64 framework.
#SDK='/Developer/SDKs/MacOSX10.5.sdk'
#
#MINVER='-mmacosx-version-min=10.5'
#
#ARCHES='-arch ppc64 -arch x86_64'
if test -d $SDK; then
echo "Configuring libcurl for 32 bit universal framework..."
./configure --disable-dependency-tracking --disable-static --with-gssapi \
CFLAGS="-isysroot $SDK $ARCHES $MINVER" \
LDFLAGS="-Wl,-syslibroot,$SDK $ARCHES $MINVER -Wl,-headerpad_max_install_names"
echo "Building libcurl..."
make
echo "Creating framework..."
rm -r libcurl.framework
mkdir -p libcurl.framework/Versions/A/Resources
cp lib/.libs/libcurl.dylib libcurl.framework/Versions/A/libcurl
install_name_tool -id @executable_path/../Frameworks/libcurl.framework/Versions/A/libcurl libcurl.framework/Versions/A/libcurl
/usr/bin/sed -e "s/7\.12\.3/$VERSION/" lib/libcurl.plist >libcurl.framework/Versions/A/Resources/Info.plist
mkdir -p libcurl.framework/Versions/A/Headers
cp include/curl/*.h libcurl.framework/Versions/A/Headers
cd libcurl.framework
ln -fs Versions/A/libcurl libcurl
ln -fs Versions/A/Resources Resources
ln -fs Versions/A/Headers Headers
cd Versions
ln -fs A Current
echo "libcurl.framework is built and can now be included in other projects."
else
echo "Building libcurl.framework requires Mac OS X 10.4 or later with the MacOSX10.4u SDK installed."
fi

View File

@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -25,9 +25,9 @@ AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = CHANGES COPYING maketgz reconf Makefile.dist curl-config.in \
EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in \
curl-style.el sample.emacs RELEASE-NOTES buildconf buildconf.bat \
libcurl.pc.in vc6curl.dsw
libcurl.pc.in vc6curl.dsw MacOSX-Framework
bin_SCRIPTS = curl-config

View File

@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -256,11 +256,18 @@ linux: all
linux-ssl: ssl
vc8:
@echo "generate VC8 makefiles"
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/wsock32.lib/wsock32.lib bufferoverflowu.lib/g" -e "s/VC6/VC8/g" lib/Makefile.vc6 > lib/Makefile.vc8
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/wsock32.lib/wsock32.lib bufferoverflowu.lib/g" -e "s/VC6/VC8/g" src/Makefile.vc6 > src/Makefile.vc8
# VC9 makefiles are for use with VS2008
vc9:
@echo "generate VC9 makefiles"
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/wsock32.lib/ws2_32.lib/g" -e "s/vc6/vc9/g" -e "s/VC6/VC9/g" lib/Makefile.vc6 > lib/Makefile.vc9
@sed -e "s#/GX /DWIN32 /YX#/EHsc /DWIN32#" -e "s#/GZ#/RTC1#" -e "s/wsock32.lib/ws2_32.lib/g" -e "s/vc6/vc9/g" -e "s/VC6/VC9/g" src/Makefile.vc6 > src/Makefile.vc9
ca-bundle: lib/mk-ca-bundle.pl
@echo "generate a fresh ca-bundle.crt"
@perl $< -b -l -u lib/ca-bundle.crt

View File

@@ -1,32 +1,57 @@
Curl and libcurl 7.19.3
Curl and libcurl 7.19.4
Public curl releases: 109
Command line options: 128
curl_easy_setopt() options: 158
Public curl releases: 110
Command line options: 132
curl_easy_setopt() options: 163
Public functions in libcurl: 58
Known libcurl bindings: 37
Contributors: 683
Known libcurl bindings: 38
Contributors: 700
This release includes the following security-related fix:
o CVE-2009-0037 with the curl advisory here:
http://curl.haxx.se/docs/adv_20090303.html
This release includes the following changes:
o
o Added CURLOPT_NOPROXY and the corresponding --noproxy
o the OpenSSL-specific code disables TICKET (rfc5077) which is enabled by
default in openssl 0.9.8j
o Added CURLOPT_TFTP_BLKSIZE
o Added CURLOPT_SOCKS5_GSSAPI_SERVICE and CURLOPT_SOCKS5_GSSAPI_NEC - with
the corresponding curl options --socks5-gssapi-service and
--socks5-gssapi-nec
o Improved IPv6 support when built with with c-ares >= 1.6.1
o Added CURLPROXY_HTTP_1_0 and --proxy1.0
o Added docs/libcurl/symbols-in-versions
o Added CURLINFO_CONDITION_UNMET
o Added support for Digest and NTLM authentication using GnuTLS
o CURLOPT_FTP_CREATE_MISSING_DIRS can now be set to 2 to retry the CWD even
when MKD fails
o GnuTLS initing moved to curl_global_init()
o Added CURLOPT_REDIR_PROTOCOLS and CURLOPT_PROTOCOLS
This release includes the following bugfixes:
o build failure when disabling FTP but enabling GSS
o fixed several calls to memory functions that didn't check return codes
o memory leak for SSL connects with libcurl/NSS when CURLOPT_ISSUERCERT was
used
o re-use of connections with the multi interface when multiple handles used
the same server
o memory leak with HTTP GSS/kerberos authentication
o removed the default use of "Pragma: no-cache"
o fix SCP/SFTP busyloop by using a new libssh2 0.19 function
o bad fclose() after a fatal error in cookie code
o curl_multi_remove_handle() when the handle was in use in a HTTP pipeline
o GSS authentication infinite loop problem
o 550 response from SIZE no longer treated as missing file
o ftps:// control connections now use explicit protection level
o missing ssh.obj in VS makefiles
o FTP ;type=i URLs now work with CURLOPT_PROXY_TRANSFER_MODE in Turkish
locale
o realms with quoted quotation marks in HTTP Digest headers
o VC9 makefiles are now really included
o multi interface memory leak with CURLMOPT_MAXCONNECTS set
o CURLINFO_CONTENT_LENGTH_DOWNLOAD size from file:// "transfers" with
CURLOPT_NOBODY set true
o memory leak on some libz errors for content encodings
o NSS-enabled build is repaired
o superfluous wait in SFTP downloads removed
o FTP with the multi interface no longer kills the control connection as
easily on transfer failures
o compilation halting when using VS2008 to build a Windows 2000 target
o ease creation of libcurl Mac OS X Framework
o CURLINFO_CONTENT_LENGTH_DOWNLOAD and CURLINFO_CONTENT_LENGTH_UPLOAD are -1
if unknown
o Negotiate proxy authentication
o CURLOPT_INTERFACE and CURLOPT_LOCALPORT used together
This release includes the following known bugs:
@@ -35,8 +60,11 @@ This release includes the following known bugs:
This release would not have looked like this without help, code, reports and
advice from friends like these:
Yang Tse, Daniel Fandrich, Jim Meyering, Christian Krause, Andreas Wurf,
Markus Koetter, Josef Wolf, Vlad Grachov, Pawel Kierski, Igor Novoseltsev,
Fred Machado, Ken Hirsch
Lisa Xu, Daniel Fandrich, Craig A West, Alexey Borzov, Sharad Gupta,
Peter Sylvester, Chad Monroe, Markus Moeller, Yang Tse, Scott Cantor,
Patrick Scott, Hidemoto Nakada, Jocelyn Jaubert, Andre Guibert de Bruet,
Kamil Dudka, Patrik Thunstrom, Linus Nielsen Feltzing, Mark Incley,
Daniel Johnson, James Cheng, Brian J. Murrell, Senthil Raja Velu,
Markus Koetter, David Kierznowski, Michal Marek
Thanks! (and sorry if I forgot to mention someone)

View File

@@ -1,24 +1,11 @@
To be addressed in 7.19.3 (planned release: January 2009)
To be addressed in 7.19.5 (planned release: May 2009)
=========================
193 - Fix zero-byte file transfers
- Nobody has actually started for real on this
216 - Markus Moeller's "proxy question" to reverse lookup SOCKS proxys and more
196 - #2351653 "crash in ConnectionExists"
- Being worked on in the bug tracker
215 - Patch for Metalink Support (for the curl tool)
197 - IIS-bug in Digest
220 - Take advantage of libssh2_version() that's been added for the upcoming
1.1, to extract the run-time version number properly.
199 - "Bug 2351645" adjustment of the patch Daniel S applied
- Suggested fix posted to list
200 - "afert redirect, the content length is not reset" by Shunlong Bai
201 - "bug: header data output to the body callback function after set header"
by Shunlong Bai
202 - "hangs up of application above libcurl" - problems with the multi_socket
implementation when using HTTP pipelining. Patch pending by
Igor Novoseltsev
203 -
221 -

View File

@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -3057,3 +3057,36 @@ AC_DEFUN([CURL_CHECK_WIN32_LARGEFILE], [
;;
esac
])
dnl CURL_CHECK_PKGCONFIG ($module)
dnl ------------------------
dnl search for the pkg-config tool (if not cross-compiling). Set the PKGCONFIG
dnl variable to hold the path to it, or 'no' if not found/present.
dnl
dnl If pkg-config is present, check that it has info about the $module or return
dnl "no" anyway!
dnl
AC_DEFUN([CURL_CHECK_PKGCONFIG], [
if test x$cross_compiling != xyes; then
dnl only do pkg-config magic when not cross-compiling
AC_PATH_PROG( PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin)
if test x$PKGCONFIG != xno; then
AC_MSG_CHECKING([for $1 options with pkg-config])
dnl ask pkg-config about $1
$PKGCONFIG --exists $1
if test "$?" -ne "0"; then
dnl pkg-config does not have info about the given module! set the
dnl variable to 'no'
PKGCONFIG="no"
AC_MSG_RESULT([no])
else
AC_MSG_RESULT([found])
fi
fi
else
PKGCONFIG="no"
fi
])

View File

@@ -1,5 +1,34 @@
Changelog for the c-ares project
* February 20 2009 (Yang Tse)
- Do not halt compilation when using VS2008 to build a Windows 2000 target.
* February 3 2009 (Phil Blundell)
- If the server returns garbage or nothing at all in response to an AAAA query,
go on and ask for A records anyway.
* January 31 2009 (Daniel Stenberg)
- ares_gethostbyname() now accepts 'AF_UNSPEC' as a family for resolving
either AF_INET6 or AF_INET. It works by accepting any of the looksups in the
hosts file, and it resolves the AAAA field with a fallback to A.
* January 14 2009 (Daniel Stenberg)
- ares.h no longer uses the HAVE_STRUCT_IN6_ADDR define check, but instead it
now declares the private struct ares_in6_addr for all systems instead of
relying on one possibly not present in the system.
* January 13 2009 (Phil Blundell)
- ares__send_query() now varies the retry timeout pseudo-randomly to avoid
packet storms when several queries were started at the same time.
* January 11 2009 (Daniel Stenberg)
- Phil Blundell added the internal function ares__expand_name_for_response()
that is now used by the ares_parse_*_reply() functions instead of the
ares_expand_name() simply to easier return ARES_EBADRESP for the cases where
the name expansion fails as in responses that really isn't expected.
Version 1.6.0 (Dec 9, 2008)
* December 9 2008 (Gisle Vanem)
Fixes for Win32 targets using the Watt-32 tcp/ip stack.

View File

@@ -323,6 +323,9 @@ else
@echo $(DL)#define HAVE_TERMIOS_H 1$(DL) >> $@
@echo $(DL)#define HAVE_AF_INET6 1$(DL) >> $@
@echo $(DL)#define HAVE_PF_INET6 1$(DL) >> $@
@echo $(DL)#define HAVE_FREEADDRINFO 1$(DL) >> $@
@echo $(DL)#define HAVE_GETADDRINFO 1$(DL) >> $@
@echo $(DL)#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1$(DL) >> $@
@echo $(DL)#define HAVE_STRUCT_IN6_ADDR 1$(DL) >> $@
@echo $(DL)#define HAVE_STRUCT_SOCKADDR_IN6 1$(DL) >> $@
@echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@

View File

@@ -22,4 +22,4 @@ original ares.
You'll find all c-ares details and news here:
http://daniel.haxx.se/projects/c-ares
http://c-ares.haxx.se/

View File

@@ -1,25 +1,19 @@
This is what's new and changed in the c-ares 1.6.0 release:
This is what's new and changed in the c-ares 1.6.1 release:
Changed:
o Added support for the glibc "rotate" resolv.conf option (or ARES_OPT_ROTATE)
o Added ares_gethostbyname_file()
o Added ares_dup()
o Added ares_set_socket_callback()
o in6_addr is not used in ares.h anymore, but a private ares_in6_addr is
instead declared and used
p ares_gethostbyname() now supports 'AF_UNSPEC' as a family for resolving
either AF_INET6 or AF_INET
Fixed:
o improved configure detection of several functions
o improved source code portability
o adig supports a regular numerical dotted IP address for the -s option
o handling of EINPROGRESS for UDP connects
o ares_parse_ptr_reply() would cause a buffer to shrink instead of expand if a
reply contained 8 or more records
o buildconf works on OS X
o ares_parse_*_reply() functions now return ARES_EBADRESP instead of
ARES_EBADNAME if the name in the response failed to decode
Thanks go to these friendly people for their efforts and contributions:
Yang Tse, Charles Hardin, Carlo Contavalli, Brad Spencer, Gerald Combs,
Gregor Jasny
Phil Blundell
Have fun!

View File

@@ -1,7 +1,7 @@
/* $Id$ */
/* Copyright 1998 by the Massachusetts Institute of Technology.
* Copyright (C) 2007-2008 by Daniel Stenberg
* Copyright (C) 2007-2009 by Daniel Stenberg
*
* Permission to use, copy, modify, and distribute this
* software and its documentation for any purpose and without
@@ -275,21 +275,29 @@ int ares_expand_name(const unsigned char *encoded, const unsigned char *abuf,
int ares_expand_string(const unsigned char *encoded, const unsigned char *abuf,
int alen, unsigned char **s, long *enclen);
#if !defined(HAVE_STRUCT_IN6_ADDR) && !defined(s6_addr)
struct in6_addr {
/*
* NOTE: before c-ares 1.6.1 we would most often use the system in6_addr
* struct below when ares itself was built, but many apps would use this
* private version since the header checked a HAVE_* define for it. Starting
* with 1.6.1 we always declare and use our own to stop relying on the
* system's one.
*/
struct ares_in6_addr {
union {
unsigned char _S6_u8[16];
} _S6_un;
};
#define s6_addr _S6_un._S6_u8
#endif
/*
* TODO: the structs 'addrttl' and 'addr6ttl' really should get their names
* prefixed with ares_ to keep them in our own "name space".
*/
struct addrttl {
struct in_addr ipaddr;
int ttl;
};
struct addr6ttl {
struct in6_addr ip6addr;
struct ares_in6_addr ip6addr;
int ttl;
};

View File

@@ -69,16 +69,20 @@ int ares__get_hostent(FILE *fp, int family, struct hostent **host)
addr.s_addr = inet_addr(line);
if (addr.s_addr == INADDR_NONE)
{
if (ares_inet_pton(AF_INET6, line, &addr6) > 0)
{
if (family != AF_INET6)
continue;
/* It wasn't an AF_INET dotted address, then AF_UNSPEC and AF_INET6
families are subject for this further check */
if ((family != AF_INET) &&
(ares_inet_pton(AF_INET6, line, &addr6) > 0)) {
addrlen = sizeof(struct in6_addr);
family = AF_INET6;
}
else
continue;
}
else if (family == AF_UNSPEC)
family = AF_INET; /* now confirmed! */
else if (family != AF_INET)
/* unknown, keep moving */
continue;
/* Get the canonical hostname. */

View File

@@ -177,3 +177,14 @@ static int name_length(const unsigned char *encoded, const unsigned char *abuf,
*/
return (n) ? n - 1 : n;
}
/* Like ares_expand_name but returns EBADRESP in case of invalid input. */
int ares__expand_name_for_response(const unsigned char *encoded,
const unsigned char *abuf, int alen,
char **s, long *enclen)
{
int status = ares_expand_name(encoded, abuf, alen, s, enclen);
if (status == ARES_EBADNAME)
status = ARES_EBADRESP;
return status;
}

View File

@@ -66,7 +66,7 @@ static void addr_callback(void *arg, int status, int timeouts,
static void end_aquery(struct addr_query *aquery, int status,
struct hostent *host);
static int file_lookup(struct ares_addr *addr, struct hostent **host);
static void ptr_rr_name(char *name, struct ares_addr *addr);
static void ptr_rr_name(char *name, const struct ares_addr *addr);
void ares_gethostbyaddr(ares_channel channel, const void *addr, int addrlen,
int family, ares_host_callback callback, void *arg)
@@ -252,7 +252,7 @@ static int file_lookup(struct ares_addr *addr, struct hostent **host)
return status;
}
static void ptr_rr_name(char *name, struct ares_addr *addr)
static void ptr_rr_name(char *name, const struct ares_addr *addr)
{
if (addr->family == AF_INET)
{

View File

@@ -61,7 +61,8 @@ struct host_query {
char *name;
ares_host_callback callback;
void *arg;
int family;
int sent_family; /* this family is what was is being used */
int want_family; /* this family is what is asked for in the API */
const char *remaining_lookups;
int timeouts;
};
@@ -71,26 +72,31 @@ static void host_callback(void *arg, int status, int timeouts,
unsigned char *abuf, int alen);
static void end_hquery(struct host_query *hquery, int status,
struct hostent *host);
static int fake_hostent(const char *name, int family, ares_host_callback callback,
void *arg);
static int fake_hostent(const char *name, int family,
ares_host_callback callback, void *arg);
static int file_lookup(const char *name, int family, struct hostent **host);
static void sort_addresses(struct hostent *host, struct apattern *sortlist,
int nsort);
static void sort6_addresses(struct hostent *host, struct apattern *sortlist,
int nsort);
static int get_address_index(struct in_addr *addr, struct apattern *sortlist,
int nsort);
static int get6_address_index(struct in6_addr *addr, struct apattern *sortlist,
int nsort);
static void sort_addresses(struct hostent *host,
const struct apattern *sortlist, int nsort);
static void sort6_addresses(struct hostent *host,
const struct apattern *sortlist, int nsort);
static int get_address_index(const struct in_addr *addr,
const struct apattern *sortlist, int nsort);
static int get6_address_index(const struct in6_addr *addr,
const struct apattern *sortlist, int nsort);
void ares_gethostbyname(ares_channel channel, const char *name, int family,
ares_host_callback callback, void *arg)
{
struct host_query *hquery;
/* Right now we only know how to look up Internet addresses. */
if (family != AF_INET && family != AF_INET6)
{
/* Right now we only know how to look up Internet addresses - and unspec
means try both basically. */
switch (family) {
case AF_INET:
case AF_INET6:
case AF_UNSPEC:
break;
default:
callback(arg, ARES_ENOTIMP, 0, NULL);
return;
}
@@ -107,9 +113,9 @@ void ares_gethostbyname(ares_channel channel, const char *name, int family,
}
hquery->channel = channel;
hquery->name = strdup(name);
hquery->family = family;
if (!hquery->name)
{
hquery->want_family = family;
hquery->sent_family = -1; /* nothing is sent yet */
if (!hquery->name) {
free(hquery);
callback(arg, ARES_ENOMEM, 0, NULL);
return;
@@ -136,17 +142,23 @@ static void next_lookup(struct host_query *hquery, int status_code)
case 'b':
/* DNS lookup */
hquery->remaining_lookups = p + 1;
if (hquery->family == AF_INET6)
if ((hquery->want_family == AF_INET6) ||
(hquery->want_family == AF_UNSPEC)) {
/* if inet6 or unspec, start out with AAAA */
hquery->sent_family = AF_INET6;
ares_search(hquery->channel, hquery->name, C_IN, T_AAAA,
host_callback, hquery);
else
}
else {
hquery->sent_family = AF_INET;
ares_search(hquery->channel, hquery->name, C_IN, T_A, host_callback,
hquery);
}
return;
case 'f':
/* Host file lookup */
status = file_lookup(hquery->name, hquery->family, &host);
status = file_lookup(hquery->name, hquery->want_family, &host);
/* this status check below previously checked for !ARES_ENOTFOUND,
but we should not assume that this single error code is the one
@@ -173,22 +185,22 @@ static void host_callback(void *arg, int status, int timeouts,
hquery->timeouts += timeouts;
if (status == ARES_SUCCESS)
{
if (hquery->family == AF_INET)
if (hquery->sent_family == AF_INET)
{
status = ares_parse_a_reply(abuf, alen, &host, NULL, NULL);
if (host && channel->nsort)
sort_addresses(host, channel->sortlist, channel->nsort);
}
else if (hquery->family == AF_INET6)
else if (hquery->sent_family == AF_INET6)
{
status = ares_parse_aaaa_reply(abuf, alen, &host, NULL, NULL);
if (status == ARES_ENODATA)
{
/* The query returned something (e.g. CNAME) but there were no
AAAA records. Try looking up A instead. */
hquery->family = AF_INET;
ares_search(hquery->channel, hquery->name, C_IN, T_A, host_callback,
hquery);
if (status == ARES_ENODATA || status == ARES_EBADRESP) {
/* The query returned something but either there were no AAAA records (e.g. just CNAME)
or the response was malformed. Try looking up A instead.
We should possibly limit this attempt-next logic to AF_UNSPEC lookups only. */
hquery->sent_family = AF_INET;
ares_search(hquery->channel, hquery->name, C_IN, T_A,
host_callback, hquery);
return;
}
if (host && channel->nsort)
@@ -196,10 +208,11 @@ static void host_callback(void *arg, int status, int timeouts,
}
end_hquery(hquery, status, host);
}
else if (status == ARES_ENODATA && hquery->family == AF_INET6)
else if ((status == ARES_ENODATA || status == ARES_EBADRESP || status == ARES_ETIMEOUT) && hquery->sent_family == AF_INET6)
{
/* There was no AAAA. Now lookup an A */
hquery->family = AF_INET;
/* The AAAA query yielded no useful result. Now look up an A instead.
We should possibly limit this attempt-next logic to AF_UNSPEC lookups only. */
hquery->sent_family = AF_INET;
ares_search(hquery->channel, hquery->name, C_IN, T_A, host_callback,
hquery);
}
@@ -391,7 +404,7 @@ static int file_lookup(const char *name, int family, struct hostent **host)
return status;
}
static void sort_addresses(struct hostent *host, struct apattern *sortlist,
static void sort_addresses(struct hostent *host, const struct apattern *sortlist,
int nsort)
{
struct in_addr a1, a2;
@@ -421,7 +434,8 @@ static void sort_addresses(struct hostent *host, struct apattern *sortlist,
/* Find the first entry in sortlist which matches addr. Return nsort
* if none of them match.
*/
static int get_address_index(struct in_addr *addr, struct apattern *sortlist,
static int get_address_index(const struct in_addr *addr,
const struct apattern *sortlist,
int nsort)
{
int i;
@@ -446,7 +460,7 @@ static int get_address_index(struct in_addr *addr, struct apattern *sortlist,
return i;
}
static void sort6_addresses(struct hostent *host, struct apattern *sortlist,
static void sort6_addresses(struct hostent *host, const struct apattern *sortlist,
int nsort)
{
struct in6_addr a1, a2;
@@ -476,7 +490,8 @@ static void sort6_addresses(struct hostent *host, struct apattern *sortlist,
/* Find the first entry in sortlist which matches addr. Return nsort
* if none of them match.
*/
static int get6_address_index(struct in6_addr *addr, struct apattern *sortlist,
static int get6_address_index(const struct in6_addr *addr,
const struct apattern *sortlist,
int nsort)
{
int i;

View File

@@ -83,7 +83,7 @@ int ares_parse_a_reply(const unsigned char *abuf, int alen,
/* Expand the name from the question, and skip past the question. */
aptr = abuf + HFIXEDSZ;
status = ares_expand_name(aptr, abuf, alen, &hostname, &len);
status = ares__expand_name_for_response(aptr, abuf, alen, &hostname, &len);
if (status != ARES_SUCCESS)
return status;
if (aptr + len + QFIXEDSZ > abuf + alen)
@@ -95,7 +95,8 @@ int ares_parse_a_reply(const unsigned char *abuf, int alen,
if (host)
{
/* Allocate addresses and aliases; ancount gives an upper bound for both. */
/* Allocate addresses and aliases; ancount gives an upper bound for
both. */
addrs = malloc(ancount * sizeof(struct in_addr));
if (!addrs)
{
@@ -123,7 +124,7 @@ int ares_parse_a_reply(const unsigned char *abuf, int alen,
for (i = 0; i < (int)ancount; i++)
{
/* Decode the RR up to the data field. */
status = ares_expand_name(aptr, abuf, alen, &rr_name, &len);
status = ares__expand_name_for_response(aptr, abuf, alen, &rr_name, &len);
if (status != ARES_SUCCESS)
break;
aptr += len;
@@ -176,7 +177,8 @@ int ares_parse_a_reply(const unsigned char *abuf, int alen,
naliases++;
/* Decode the RR data and replace the hostname with it. */
status = ares_expand_name(aptr, abuf, alen, &rr_data, &len);
status = ares__expand_name_for_response(aptr, abuf, alen, &rr_data,
&len);
if (status != ARES_SUCCESS)
break;
free(hostname);

View File

@@ -84,7 +84,7 @@ int ares_parse_aaaa_reply(const unsigned char *abuf, int alen,
/* Expand the name from the question, and skip past the question. */
aptr = abuf + HFIXEDSZ;
status = ares_expand_name(aptr, abuf, alen, &hostname, &len);
status = ares__expand_name_for_response(aptr, abuf, alen, &hostname, &len);
if (status != ARES_SUCCESS)
return status;
if (aptr + len + QFIXEDSZ > abuf + alen)
@@ -123,7 +123,7 @@ int ares_parse_aaaa_reply(const unsigned char *abuf, int alen,
for (i = 0; i < (int)ancount; i++)
{
/* Decode the RR up to the data field. */
status = ares_expand_name(aptr, abuf, alen, &rr_name, &len);
status = ares__expand_name_for_response(aptr, abuf, alen, &rr_name, &len);
if (status != ARES_SUCCESS)
break;
aptr += len;
@@ -176,7 +176,8 @@ int ares_parse_aaaa_reply(const unsigned char *abuf, int alen,
naliases++;
/* Decode the RR data and replace the hostname with it. */
status = ares_expand_name(aptr, abuf, alen, &rr_data, &len);
status = ares__expand_name_for_response(aptr, abuf, alen, &rr_data,
&len);
if (status != ARES_SUCCESS)
break;
free(hostname);

View File

@@ -73,7 +73,7 @@ int ares_parse_ns_reply( const unsigned char* abuf, int alen,
/* Expand the name from the question, and skip past the question. */
aptr = abuf + HFIXEDSZ;
status = ares_expand_name( aptr, abuf, alen, &hostname, &len );
status = ares__expand_name_for_response( aptr, abuf, alen, &hostname, &len);
if ( status != ARES_SUCCESS )
return status;
if ( aptr + len + QFIXEDSZ > abuf + alen )
@@ -96,7 +96,7 @@ int ares_parse_ns_reply( const unsigned char* abuf, int alen,
for ( i = 0; i < ( int ) ancount; i++ )
{
/* Decode the RR up to the data field. */
status = ares_expand_name( aptr, abuf, alen, &rr_name, &len );
status = ares__expand_name_for_response( aptr, abuf, alen, &rr_name, &len );
if ( status != ARES_SUCCESS )
break;
aptr += len;
@@ -113,7 +113,8 @@ int ares_parse_ns_reply( const unsigned char* abuf, int alen,
if ( rr_class == C_IN && rr_type == T_NS )
{
/* Decode the RR data and add it to the nameservers list */
status = ares_expand_name( aptr, abuf, alen, &rr_data, &len );
status = ares__expand_name_for_response( aptr, abuf, alen, &rr_data,
&len);
if ( status != ARES_SUCCESS )
{
break;

View File

@@ -73,7 +73,7 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
/* Expand the name from the question, and skip past the question. */
aptr = abuf + HFIXEDSZ;
status = ares_expand_name(aptr, abuf, alen, &ptrname, &len);
status = ares__expand_name_for_response(aptr, abuf, alen, &ptrname, &len);
if (status != ARES_SUCCESS)
return status;
if (aptr + len + QFIXEDSZ > abuf + alen)
@@ -94,7 +94,7 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
for (i = 0; i < (int)ancount; i++)
{
/* Decode the RR up to the data field. */
status = ares_expand_name(aptr, abuf, alen, &rr_name, &len);
status = ares__expand_name_for_response(aptr, abuf, alen, &rr_name, &len);
if (status != ARES_SUCCESS)
break;
aptr += len;
@@ -112,7 +112,8 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
&& strcasecmp(rr_name, ptrname) == 0)
{
/* Decode the RR data and set hostname to it. */
status = ares_expand_name(aptr, abuf, alen, &rr_data, &len);
status = ares__expand_name_for_response(aptr, abuf, alen, &rr_data,
&len);
if (status != ARES_SUCCESS)
break;
if (hostname)
@@ -141,7 +142,8 @@ int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr,
if (rr_class == C_IN && rr_type == T_CNAME)
{
/* Decode the RR data and replace ptrname with it. */
status = ares_expand_name(aptr, abuf, alen, &rr_data, &len);
status = ares__expand_name_for_response(aptr, abuf, alen, &rr_data,
&len);
if (status != ARES_SUCCESS)
break;
free(ptrname);

View File

@@ -319,6 +319,9 @@ int ares__read_line(FILE *fp, char **buf, int *bufsize);
void ares__free_query(struct query *query);
unsigned short ares__generate_new_id(rc4_key* key);
struct timeval ares__tvnow(void);
int ares__expand_name_for_response(const unsigned char *encoded,
const unsigned char *abuf, int alen,
char **s, long *enclen);
#if 0 /* Not used */
long ares__tvdiff(struct timeval t1, struct timeval t2);
#endif

View File

@@ -715,6 +715,7 @@ void ares__send_query(ares_channel channel, struct query *query,
{
struct send_request *sendreq;
struct server_state *server;
int timeplus;
server = &channel->servers[query->server];
if (query->using_tcp)
@@ -778,9 +779,11 @@ void ares__send_query(ares_channel channel, struct query *query,
return;
}
}
timeplus = channel->timeout << (query->try / channel->nservers);
timeplus = (timeplus * (9 + (rand () & 7))) / 16;
query->timeout = *now;
ares__timeadd(&query->timeout,
channel->timeout << (query->try / channel->nservers));
timeplus);
/* Keep track of queries bucketed by timeout, so we can process
* timeout events quickly.
*/

View File

@@ -292,7 +292,7 @@ static int single_domain(ares_channel channel, const char *name, char **s)
}
else
{
error = ERRNO;
error = errno;
switch(error)
{
case ENOENT:

View File

@@ -4,12 +4,12 @@
#define ARES__VERSION_H
#define ARES_VERSION_MAJOR 1
#define ARES_VERSION_MINOR 5
#define ARES_VERSION_PATCH 4
#define ARES_VERSION_MINOR 6
#define ARES_VERSION_PATCH 1
#define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\
(ARES_VERSION_MINOR<<8)|\
(ARES_VERSION_PATCH))
#define ARES_VERSION_STR "1.5.4-CVS"
#define ARES_VERSION_STR "1.6.1-CVS"
#ifdef __cplusplus
extern "C" {

View File

@@ -223,17 +223,33 @@
#define _CRT_NONSTDC_NO_DEPRECATE 1
#endif
/* VS2008 does not support Windows build targets prior to WinXP, */
/* so, if no build target has been defined we will target WinXP. */
/* Officially, Microsoft's Windows SDK versions 6.X do not support Windows
2000 as a supported build target. VS2008 default installations provide an
embedded Windows SDK v6.0A along with the claim that Windows 2000 is a
valid build target for VS2008. Popular belief is that binaries built using
Windows SDK versions 6.X and Windows 2000 as a build target are functional */
#if defined(_MSC_VER) && (_MSC_VER >= 1500)
# define VS2008_MINIMUM_TARGET 0x0500
#endif
/* When no build target is specified VS2008 default build target is Windows
Vista, which leaves out even Winsows XP. If no build target has been given
for VS2008 we will target the minimum Officially supported build target,
which happens to be Windows XP. */
#if defined(_MSC_VER) && (_MSC_VER >= 1500)
# define VS2008_DEFAULT_TARGET 0x0501
#endif
/* VS2008 default target settings and minimum build target check */
#if defined(_MSC_VER) && (_MSC_VER >= 1500)
# ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x0501
# define _WIN32_WINNT VS2008_DEFAULT_TARGET
# endif
# ifndef WINVER
# define WINVER 0x0501
# define WINVER VS2008_DEFAULT_TARGET
# endif
# if (_WIN32_WINNT < 0x0501) || (WINVER < 0x0501)
# error VS2008 does not support Windows build targets prior to WinXP
# if (_WIN32_WINNT < VS2008_MINIMUM_TARGET) || (WINVER < VS2008_MINIMUM_TARGET)
# error VS2008 does not support Windows build targets prior to Windows 2000
# endif
#endif

5
ares/m4/.cvsignore Normal file
View File

@@ -0,0 +1,5 @@
libtool.m4
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4

View File

@@ -6,7 +6,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -191,7 +191,7 @@ else
libtoolize=`findtool $LIBTOOLIZE`
fi
lt_pversion=`$libtool --version 2>/dev/null|head -n 2|sed -e 's/^[^0-9]*//g' -e 's/[- ].*//'`
lt_pversion=`$libtool --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//g' -e 's/[- ].*//'`
if test -z "$lt_pversion"; then
echo "buildconf: libtool not found."
echo " You need libtool version $LIBTOOL_WANTED_VERSION or newer installed"
@@ -277,6 +277,10 @@ for fname in .deps \
libtool \
libtool.m4 \
ltmain.sh \
ltoptions.m4 \
ltsugar.m4 \
ltversion.m4 \
lt~obsolete.m4 \
stamp-h1 \
stamp-h2 \
stamp-h3 ; do

View File

@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -818,6 +818,21 @@ if test "$ipv6" = "yes"; then
curl_ipv6_msg="enabled"
fi
# Check if struct sockaddr_in6 have sin6_scope_id member
if test "$ipv6" = yes; then
AC_MSG_CHECKING([if struct sockaddr_in6 has sin6_scope_id member])
AC_TRY_COMPILE([
#include <sys/types.h>
#include <netinet/in.h>] ,
struct sockaddr_in6 s; s.sin6_scope_id = 0; , have_sin6_scope_id=yes)
if test "$have_sin6_scope_id" = yes; then
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID, 1, [Define to 1 if struct sockaddr_in6 has the sin6_scope_id member])
else
AC_MSG_RESULT([no])
fi
fi
dnl **********************************************************************
dnl Check if the operating system allows programs to write to their own argv[]
dnl **********************************************************************
@@ -1156,25 +1171,19 @@ if test X"$OPT_SSL" != Xno; then
PKGTEST="no"
PREFIX_OPENSSL=$OPT_SSL
LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff"
if [ "$PREFIX_OPENSSL" != "/usr" ] ; then
LDFLAGS="$LDFLAGS -L$LIB_OPENSSL"
CPPFLAGS="$CPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include"
CPPFLAGS="$CPPFLAGS -I$PREFIX_OPENSSL/include"
fi
CPPFLAGS="$CPPFLAGS -I$PREFIX_OPENSSL/include/openssl"
;;
esac
if test "$PKGTEST" = "yes"; then
dnl Detect the pkg-config tool, as it may have extra info about the
dnl openssl installation we can use. I *believe* this is what we are
dnl expected to do on really recent Redhat Linux hosts.
CURL_CHECK_PKGCONFIG(openssl)
AC_PATH_PROG( PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin)
if test "$PKGCONFIG" != "no" ; then
AC_MSG_CHECKING([OpenSSL options with pkg-config])
$PKGCONFIG --exists openssl
SSL_EXISTS=$?
if test "$SSL_EXISTS" -eq "0"; then
SSL_LIBS=`$PKGCONFIG --libs-only-l openssl 2>/dev/null`
SSL_LDFLAGS=`$PKGCONFIG --libs-only-L openssl 2>/dev/null`
SSL_CPPFLAGS=`$PKGCONFIG --cflags-only-I openssl 2>/dev/null`
@@ -1185,10 +1194,6 @@ if test X"$OPT_SSL" != Xno; then
LIBS="$LIBS $SSL_LIBS"
CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS"
LDFLAGS="$LDFLAGS $SSL_LDFLAGS"
AC_MSG_RESULT([found])
else
AC_MSG_RESULT([no])
fi
fi
fi
@@ -1529,7 +1534,7 @@ if test X"$OPENSSL_ENABLED" = X"1"; then
fi
dnl ----------------------------------------------------
dnl FIX: only check for GnuTLS if OpenSSL is not enabled
dnl check for GnuTLS
dnl ----------------------------------------------------
dnl Default to compiler & linker defaults for GnuTLS files & libraries.
@@ -1543,29 +1548,51 @@ AC_HELP_STRING([--without-gnutls], [disable GnuTLS detection]),
if test "$OPENSSL_ENABLED" != "1"; then
if test X"$OPT_GNUTLS" != Xno; then
AC_MSG_NOTICE([OPT_GNUTLS is $OPT_GNUTLS])
addld=""
if test "x$OPT_GNUTLS" = "xyes"; then
check=`libgnutls-config --version 2>/dev/null`
if test -n "$check"; then
addlib=`libgnutls-config --libs`
addcflags=`libgnutls-config --cflags`
version=`libgnutls-config --version`
gtlsprefix=`libgnutls-config --prefix`
gtlslib=`libgnutls-config --prefix`/lib$libsuff
fi
else
addlib=`$OPT_GNUTLS/bin/libgnutls-config --libs`
addcflags=`$OPT_GNUTLS/bin/libgnutls-config --cflags`
version=`$OPT_GNUTLS/bin/libgnutls-config --version 2>/dev/null`
gtlsprefix=$OPT_GNUTLS
gtlslib=$OPT_GNUTLS/lib$libsuff
fi
if test -z "$version"; then
CURL_CHECK_PKGCONFIG(gnutls)
if test "$PKGCONFIG" != "no" ; then
addlib=`$PKGCONFIG --libs-only-l gnutls`
addld=`$PKGCONFIG --libs-only-L gnutls`
addcflags=`$PKGCONFIG --cflags-only-I gnutls`
version=`$PKGCONFIG --modversion gnutls`
gtlslib=`echo $addld | $SED -e 's/-L//'`
fi
fi
if test -z "$version"; then
dnl lots of efforts, still no go
version="unknown"
fi
fi
if test -n "$addlib"; then
CLEANLIBS="$LIBS"
CLEANCPPFLAGS="$CPPFLAGS"
CLEADLDFLAGS="$LDFLAGS"
LIBS="$LIBS $addlib"
LDFLAGS="$LDFLAGS $addld"
if test "$addcflags" != "-I/usr/include"; then
CPPFLAGS="$CPPFLAGS $addcflags"
fi
@@ -1586,14 +1613,16 @@ if test "$OPENSSL_ENABLED" != "1"; then
if test "x$USE_GNUTLS" = "xyes"; then
AC_MSG_NOTICE([detected GnuTLS version $version])
if test -n "$gtlslib"; then
dnl when shared libs were found in a path that the run-time
dnl linker doesn't search through, we need to add it to
dnl LD_LIBRARY_PATH to prevent further configure tests to fail
dnl due to this
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlsprefix/lib$libsuff"
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$gtlslib"
export LD_LIBRARY_PATH
AC_MSG_NOTICE([Added $gtlsprefix/lib$libsuff to LD_LIBRARY_PATH])
AC_MSG_NOTICE([Added $gtlslib to LD_LIBRARY_PATH])
fi
fi
fi
@@ -1618,12 +1647,14 @@ if test "$OPENSSL_ENABLED" != "1" -a "$GNUTLS_ENABLED" != "1"; then
if test X"$OPT_NSS" != Xno; then
if test "x$OPT_NSS" = "xyes"; then
check=`pkg-config --version 2>/dev/null`
if test -n "$check"; then
addlib=`pkg-config --libs nss`
addcflags=`pkg-config --cflags nss`
version=`pkg-config --modversion nss`
nssprefix=`pkg-config --variable=prefix nss`
CURL_CHECK_PKGCONFIG(nss)
if test "$PKGCONFIG" != "no" ; then
addlib=`$PKGCONFIG --libs nss`
addcflags=`$PKGCONFIG --cflags nss`
version=`$PKGCONFIG --modversion nss`
nssprefix=`$PKGCONFIG --variable=prefix nss`
fi
else
# Without pkg-config, we'll kludge in some defaults
@@ -2002,6 +2033,7 @@ CURL_CHECK_FUNC_IOCTL
CURL_CHECK_FUNC_IOCTLSOCKET
CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL
CURL_CHECK_FUNC_LOCALTIME_R
CURL_CHECK_FUNC_POLL
CURL_CHECK_FUNC_SETSOCKOPT
CURL_CHECK_FUNC_SIGACTION
CURL_CHECK_FUNC_SIGINTERRUPT
@@ -2047,7 +2079,6 @@ AC_CHECK_FUNCS([basename \
inet_addr \
perror \
pipe \
poll \
setlocale \
setmode \
setrlimit \
@@ -2104,45 +2135,6 @@ if test "$ipv6" = "yes"; then
CURL_CHECK_NI_WITHSCOPEID
fi
AC_MSG_CHECKING([if we are Mac OS X (to disable poll)])
disable_poll=no
case $host in
*-*-darwin*)
disable_poll="yes";
;;
*)
;;
esac
AC_MSG_RESULT($disable_poll)
if test "$disable_poll" = "no"; then
dnl poll() might be badly emulated, as in Mac OS X 10.3 (and other BSDs?) and
dnl to find out we make an extra check here!
if test "$ac_cv_func_poll" = "yes"; then
AC_MSG_CHECKING([if poll works with NULL inputs])
AC_RUN_IFELSE([
#ifdef HAVE_SYS_POLL_H
#include <sys/poll.h>
#elif defined(HAVE_POLL_H)
#include <poll.h>
#endif
int main(void)
{
/* make this return 0 == timeout since there's nothing to read from */
return poll((void *)0, 0, 10 /*ms*/);
}
],
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_POLL_FINE, 1, [If you have a fine poll]),
AC_MSG_RESULT(no),
AC_MSG_RESULT(cross-compiling assumes yes)
AC_DEFINE(HAVE_POLL_FINE, 1, [If you have a fine poll])
) dnl end of AC_RUN_IFELSE
fi dnl poll() was found
fi dnl poll()-check is not disabled
dnl ************************************************************
dnl enable non-blocking communications
dnl
@@ -2477,7 +2469,7 @@ fi
if test "x$USE_WINDOWS_SSPI" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI"
fi
if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1"; then
if test "x$USE_SSLEAY" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" -o "x$GNUTLS_ENABLED" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
fi

40
diff-exclude Normal file
View File

@@ -0,0 +1,40 @@
diff-exclude
*~
*.orig
*.org
*.rej
configure
Makefile
Makefile.in
*.pid
*.bak
*.o
*.lo
*.Plo
*.Po
config.log
config.status
autom4te.cache
*.patch
CVS
*.asc
config.h
*.la
*.lai
libtool
ltmain.sh
missing
mkinstalldirs
.#*
aclocal.m4
hugehelp.c
.deps
.libs
libcurl.pc
curl-config
stamp-h*
curl
curllib.dsp
curllib.vcproj
*.spec
curl.list

View File

@@ -32,7 +32,7 @@ C
C++
Written by Jean-Philippe Barrette-LaPierre
http://rrette.com/textpattern/index.php?s=cURLpp
http://curlpp.org/
Ch
@@ -54,6 +54,10 @@ Dylan
Written by Chris Double
http://dylanlibs.sourceforge.net/
Eiffel
Written by Eiffel Software
http://curl.haxx.se/libcurl/eiffel/
Euphoria
Written by Ray Smith

View File

@@ -1,4 +1,4 @@
Updated: Sep 24, 2008 (http://curl.haxx.se/docs/faq.html)
Updated: Feb 23, 2009 (http://curl.haxx.se/docs/faq.html)
_ _ ____ _
___| | | | _ \| |
/ __| | | | |_) | |
@@ -26,7 +26,7 @@ FAQ
2.1.2 only the libssl lib is missing
2.2 Does curl work/build with other SSL libraries?
2.3 Where can I find a copy of LIBEAY32.DLL?
2.4 Does curl support Socks (RFC 1928) ?
2.4 Does curl support SOCKS (RFC 1928) ?
3. Usage Problems
3.1 curl: (1) SSL is disabled, https: not supported
@@ -42,7 +42,7 @@ FAQ
3.11 How do I POST with a different Content-Type?
3.12 Why do FTP specific features over HTTP proxy fail?
3.13 Why does my single/double quotes fail?
3.14 Does curl support javascript or pac (automated proxy config)?
3.14 Does curl support Javascript or PAC (automated proxy config)?
3.15 Can I do recursive fetches with curl?
3.16 What certificates do I need when I use SSL?
3.17 How do I list the root dir of an FTP server?
@@ -71,6 +71,7 @@ FAQ
4.14 Redirects work in browser but not with curl!
4.15 FTPS doesn't work
4.16 My HTTP POST or PUT requests are slow!
4.17 Non-functional connect timeouts on Windows
5. libcurl Issues
5.1 Is libcurl thread-safe?
@@ -95,7 +96,7 @@ FAQ
6.4 I have a program that uses LGPL libraries, can I use libcurl?
6.5 Can I modify curl/libcurl for my program and keep the changes secret?
6.6 Can you please change the curl/libcurl license to XXXX?
6.7 What are my obligations when using libcurl in my commerical apps?
6.7 What are my obligations when using libcurl in my commercial apps?
7. PHP/CURL Issues
7.1 What is PHP/CURL?
@@ -119,10 +120,10 @@ FAQ
libcurl
A free and easy-to-use client-side URL transfer library, supporting FTP,
FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, FILE and LDAP. libcurl
supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading, kerberos,
HTTP form based upload, proxies, cookies, user+password authentication,
file transfer resume, http proxy tunneling and more!
FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, FILE, LDAP and LDAPS.
libcurl supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading,
kerberos, HTTP form based upload, proxies, cookies, user+password
authentication, file transfer resume, http proxy tunneling and more!
libcurl is highly portable, it builds and works identically on numerous
platforms, including Solaris, NetBSD, FreeBSD, OpenBSD, Darwin, HPUX,
@@ -137,8 +138,8 @@ FAQ
A command line tool for getting or sending files using URL syntax.
Since curl uses libcurl, it supports a range of common Internet protocols,
currently including HTTP, HTTPS, FTP, FTPS, SCP, SFTP, TFTP, LDAP, DICT,
TELNET and FILE.
currently including HTTP, HTTPS, FTP, FTPS, SCP, SFTP, TFTP, LDAP, LDAPS,
DICT, TELNET and FILE.
We pronounce curl and cURL with an initial k sound: [kurl].
@@ -227,11 +228,11 @@ FAQ
Project cURL is entirely free and open. No person gets paid for developing
(lib)curl. We do this voluntarily on our spare time.
We get some help from companies. Contactor Data hosts the curl web site,
Haxx owns the curl web site's domain and sourceforge.net hosts project
services we take advantage from, like the bug tracker. Also, some companies
have sponsored certain parts of the development in the past and I hope some
will continue to do so in the future.
We get some help from companies. CAG Contactor hosts the curl web site, Haxx
owns the curl web site's domain and sourceforge.net hosts project services
we take advantage from, like the bug tracker. Also, some companies have
sponsored certain parts of the development in the past and I hope some will
continue to do so in the future.
If you want to support our project, consider a donation or a banner-program
or even better: by helping us coding, documenting, testing etc.
@@ -299,7 +300,7 @@ FAQ
as used by numerous applications that include libcurl binaries in their
distribution packages (like Adobe Acrobat Reader and Google Earth).
More than 80 known named companies use curl in commercial environments and
More than 90 known named companies use curl in commercial environments and
products. More than 100 known named open source projects depend on
(lib)curl.
@@ -399,7 +400,7 @@ FAQ
accurate and up-to-date pointers to recent OpenSSL DLLs and other binary
packages.
2.4 Does curl support Socks (RFC 1928) ?
2.4 Does curl support SOCKS (RFC 1928) ?
Yes, SOCKS 4 and 5 are supported.
@@ -557,27 +558,27 @@ FAQ
Remember that curl works and runs on more operating systems than most single
individuals have ever tried.
3.14 Does curl support javascript or pac (automated proxy config)?
3.14 Does curl support Javascript or PAC (automated proxy config)?
Many web pages do magic stuff using embedded javascript. Curl and libcurl
Many web pages do magic stuff using embedded Javascript. Curl and libcurl
have no built-in support for that, so it will be treated just like any other
contents.
.pac files are a netscape invention and are sometimes used by organizations
to allow them to differentiate which proxies to use. The .pac contents is
just a javascript program that gets invoked by the browser and that returns
the name of the proxy to connect to. Since curl doesn't support javascript,
just a Javascript program that gets invoked by the browser and that returns
the name of the proxy to connect to. Since curl doesn't support Javascript,
it can't support .pac proxy configuration either.
Some work-arounds usually suggested to overcome this javascript dependency:
Some work-arounds usually suggested to overcome this Javascript dependency:
- Depending on the javascript complexity, write up a script that
- Depending on the Javascript complexity, write up a script that
translates it to another language and execute that.
- Read the javascript code and rewrite the same logic in another language.
- Read the Javascript code and rewrite the same logic in another language.
- Implement a javascript interpreter, people have successfully used the
Mozilla javascript engine in the past.
- Implement a Javascript interpreter, people have successfully used the
Mozilla Javascript engine in the past.
- Ask your admins to stop this, for a static proxy setup or similar.
@@ -658,21 +659,22 @@ FAQ
4.2 Why do I get problems when I use & or % in the URL?
In general unix shells, the & letter is treated special and when used, it
In general unix shells, the & symbol is treated specially and when used, it
runs the specified command in the background. To safely send the & as a part
of a URL, you should quote the entire URL by using single (') or double (")
quotes around it.
quotes around it. Similar problems can also occur on some shells with other
characters, including ?*!$~(){}<>\|;`. When in doubt, quote the URL.
An example that would invoke a remote CGI that uses &-letters could be:
An example that would invoke a remote CGI that uses &-symbols could be:
curl 'http://www.altavista.com/cgi-bin/query?text=yes&q=curl'
In Windows, the standard DOS shell treats the %-letter specially and you
need to use TWO %-letters for each single one you want to use in the URL.
In Windows, the standard DOS shell treats the %-symbol specially and you
need to use TWO %-symbols for each single one you want to use in the URL.
Also note that if you want the literal %-letter to be part of the data you
Also note that if you want the literal %-symbol to be part of the data you
pass in a POST using -d/--data you must encode it as '%25' (which then also
needs the %-letter doubled on Windows machines).
needs the %-symbol doubled on Windows machines).
4.3 How can I use {, }, [ or ] to specify multiple URLs?
@@ -787,7 +789,7 @@ FAQ
This is supported in curl 7.10.6 or later. No earlier curl version knows
of this magic. Later versions require the OpenSSL or Microsoft Windows
libraries to provide this functionality. Using GnuTLS or NSS libraries will
libraries to provide this functionality. Using the NSS library will
not provide NTLM authentication functionality in curl.
NTLM is a Microsoft proprietary protocol. Proprietary formats are evil. You
@@ -848,7 +850,7 @@ FAQ
- Meta tags. You can write a HTML tag that will cause the browser to
redirect to another given URL after a certain time.
- Javascript. You can write a javascript program embeded in a HTML page
- Javascript. You can write a Javascript program embedded in a HTML page
that redirects the browser to another given URL.
There is no way to make curl follow these redirects. You must either
@@ -884,6 +886,23 @@ FAQ
You can disable libcurl's use of the Expect: header the same way you disable
any header, using -H / CURLOPT_HTTPHEADER, or by forcing it to use HTTP 1.0.
4.17 Non-functional connect timeouts
In most Windows setups having a timeout longer than 21 seconds make no
difference, as it will only send 3 TCP SYN packets and no more. The second
packet sent three seconds after the first and the third six seconds after
the second. No more than three packets are sent, no matter how long the
timeout is set.
See option TcpMaxConnectRetransmissions on this page:
http://support.microsoft.com/?scid=kb%3Ben-us%3B175523&x=6&y=7
Also, even on non-Windows systems there may run a firewall or anti-virus
software or similar that accepts the connection but does not actually do
anything else. This will make (lib)curl to consider the connection connected
and thus the connect timeout won't trigger.
5. libcurl Issues
5.1 Is libcurl thread-safe?
@@ -897,7 +916,7 @@ FAQ
If you use a OpenSSL-powered libcurl in a multi-threaded environment, you
need to provide one or two locking functions:
http://www.openssl.org/docs/crypto/threads.html#DESCRIPTION
http://www.openssl.org/docs/crypto/threads.html
If you use a GnuTLS-powered libcurl in a multi-threaded environment, you
need to provide locking function(s) for libgcrypt (which is used by GnuTLS
@@ -1158,7 +1177,7 @@ FAQ
libraries that use it. It should be possible for everyone to use libcurl or
curl in their projects, no matter what license they already have in use.
6.7 What are my obligations when using libcurl in my commerical apps?
6.7 What are my obligations when using libcurl in my commercial apps?
Next to none. All you need to adhere to is the MIT-style license (stated in
the COPYING file) which basically says you have to include the copyright
@@ -1174,7 +1193,7 @@ FAQ
your app.
As can be seen here: http://curl.haxx.se/docs/companies.html and
elsewhere, more and more companies are dicovering the power
elsewhere, more and more companies are discovering the power
of libcurl and take advantage of it even in commercial environments.

View File

@@ -383,7 +383,7 @@ Win32
- Modify lib/setup.h
- Modify lib/Makefile.vc6
- Add defines to Project/Settings/C/C++/General/Preprocessor Definitions
in the curllib.dsw/curllib.dsp Visual C++ 6 IDE project.
in the libcurl.dsw/libcurl.dsp Visual C++ 6 IDE project.
Important static libcurl usage note
@@ -673,8 +673,9 @@ Minix
Configure and compile with:
./configure CONFIG_SHELL=/bin/bigsh CC=cc LD=cc AR=/usr/bin/aal \
GREP=grep CPPFLAGS=-D_POSIX_SOURCE=1
GREP=grep CPPFLAGS='-D_POSIX_SOURCE=1 -I/usr/local/include'
make
chmem =256000 src/curl
GCC
---
@@ -686,6 +687,7 @@ Minix
./configure CONFIG_SHELL=/bin/bigsh CC=gcc AR=/usr/gnu/bin/gar GREP=grep
make
chmem =256000 src/curl
Symbian OS

View File

@@ -3,6 +3,23 @@ join in and help us correct one or more of these! Also be sure to check the
changelog of the current development status, as one or more of these problems
may have been fixed since this was written!
62. CURLOPT_TIMEOUT does not work properly with the regular multi and
multi_socket interfaces. The work-around for apps is to simply remove the
easy handle once the time is up. See also:
http://curl.haxx.se/bug/view.cgi?id=2501457
61. If an upload using Expect: 100-continue receives an HTTP 417 response,
it ought to be automatically resent without the Expect:. A workaround is
for the client application to redo the transfer after disabling Expect:.
http://curl.haxx.se/mail/archive-2008-02/0043.html
60. libcurl closes the connection if an HTTP 401 reply is received while it
is waiting for the the 100-continue response.
http://curl.haxx.se/mail/lib-2008-08/0462.html
59. If the CURLOPT_PORT option is used on an FTP URL like
"ftp://example.com/file;type=A" the ";type=A" is stripped off.
58. It seems sensible to be able to use CURLOPT_NOBODY and
CURLOPT_FAILONERROR with FTP to detect if a file exists or not, but it is
not working: http://curl.haxx.se/mail/lib-2008-07/0295.html
@@ -25,11 +42,6 @@ may have been fixed since this was written!
library header files exporting symbols/macros that should be kept private
to the KfW library. See ticket #5601 at http://krbdev.mit.edu/rt/
53. SFTP busy-loop problem. When doing SFTP uploads, we can see that libcurl
occasionally will busy-loop while waiting for certain network conditions.
Reported by Pavel Shalagin, explained somewhat by Daniel Stenberg here:
http://curl.haxx.se/mail/lib-2008-04/0439.html
52. Gautam Kachroo's issue that identifies a problem with the multi interface
where a connection can be re-used without actually being properly
SSL-negoatiated:
@@ -47,13 +59,6 @@ may have been fixed since this was written!
function will return prematurely and will confuse the rest of the HTTP
protocol code. This should be very rare.
45. libcurl built to support ipv6 uses getaddrinfo() to resolve host names.
getaddrinfo() sorts the response list which effectively kills how libcurl
deals with round-robin DNS entries. All details:
http://curl.haxx.se/mail/lib-2007-07/0168.html
initial suggested function to use for randomizing the response:
http://curl.haxx.se/mail/lib-2007-07/0178.html
43. There seems to be a problem when connecting to the Microsoft telnet server.
http://curl.haxx.se/bug/view.cgi?id=1720605

View File

@@ -136,6 +136,14 @@ PROXY
curl -U user:passwd -x my-proxy:888 http://www.get.this/
A comma-separated list of hosts and domains which do not use the proxy can
be specified as:
curl --noproxy localhost,get.this -x my-proxy:888 http://www.get.this/
If the proxy is specified with --proxy1.0 instead of --proxy or -x, then
curl will use HTTP/1.0 instead of HTTP/1.1 for any CONNECT attempts.
curl also supports SOCKS4 and SOCKS5 proxies with --socks4 and --socks5.
See also the environment variables Curl support that offer further proxy
@@ -504,7 +512,7 @@ CONFIG FILE
can also specify the long options without the dashes to make it more
readable. You can separate the options and the parameter with spaces, or
with = or :. Comments can be used within the file. If the first letter on a
line is a '#'-letter the rest of the line is treated as a comment.
line is a '#'-symbol the rest of the line is treated as a comment.
If you want the parameter to contain spaces, you must enclose the entire
parameter within double quotes ("). Within those quotes, you specify a
@@ -793,8 +801,9 @@ ENVIRONMENT VARIABLES
NO_PROXY
If a tail substring of the domain-path for a host matches one of these
strings, transactions with that node will not be proxied.
If the host name matches one of these strings, or the host is within the
domain of one of these strings, transactions with that node will not be
proxied.
The usage of the -x/--proxy flag overrides the environment variables.

View File

@@ -36,6 +36,7 @@ Andreas Ntaflos
Andreas Olsson
Andreas Rieke
Andreas Schuldei
Andreas Wurf
Andres Garcia
Andrew Benham
Andrew Biggs
@@ -44,11 +45,13 @@ Andrew Francis
Andrew Fuller
Andrew Moise
Andrew Wansink
Andrew de los Reyes
Andr<EFBFBD>s Garc<72>a
Andy Cedilnik
Andy Serpa
Andy Tsouladze
Angus Mackay
Anthony Bryan
Antoine Calando
Anton Kalmykov
Arkadiusz Miskiewicz
@@ -60,6 +63,7 @@ Augustus Saunders
Avery Fay
Axel Tillequin
Bart Whiteley
Bas Mevissen
Ben Greear
Ben Madsen
Ben Van Hof
@@ -90,6 +94,7 @@ Chris Combes
Chris Flerackers
Chris Gaukroger
Chris Maltby
Christian Krause
Christian Kurz
Christian Robottom Reis
Christian Vogt
@@ -210,6 +215,7 @@ Forrest Cahoon
Frank Hempel
Frank Keeney
Frank Ticheler
Fred Machado
Fred New
Fred Noz
Frederic Lepied
@@ -235,6 +241,7 @@ Giuseppe Attardi
Giuseppe D'Ambrosio
Glen Nakamura
Glen Scott
Grant Erickson
Greg Hewgill
Greg Morse
Greg Onufer
@@ -308,6 +315,7 @@ Jes Badwal
Jesper Jensen
Jesse Noller
Jim Drash
Jim Meyering
Joe Halpin
Joe Malicki
Joel Chen
@@ -330,6 +338,7 @@ Jonatan Lander
Jonathan Hseu
Jongki Suwandi
Jose Kahan
Josef Wolf
Josh Kapell
Juan F. Codagnone
Juan Ignacio Herv<72>s
@@ -356,6 +365,7 @@ Keith Mok
Ken Hirsch
Ken Rastatter
Kent Boortz
Keshav Krity
Kevin Fisk
Kevin Lussier
Kevin Reed
@@ -406,6 +416,7 @@ Mario Schroeder
Mark Butler
Mark Davies
Mark Eichin
Mark Karpeles
Mark Lentczner
Markus Koetter
Markus Moeller
@@ -496,11 +507,13 @@ Paul Querna
Pavel Cenek
Pavel Orehov
Pawel A. Gajda
Pawel Kierski
Pedro Neves
Pete Su
Peter Bray
Peter Forret
Peter Heuchert
Peter Korsgaard
Peter Lamberg
Peter O'Gorman
Peter Pentchev
@@ -513,6 +526,7 @@ Peter Wullinger
Peteris Krumins
Phil Blundell
Phil Karn
Phil Lisiecki
Phil Pellouchoud
Philip Gladstone
Philip Langdale
@@ -605,6 +619,7 @@ Spiridonoff A.V
Stadler Stephan
Stefan Esser
Stefan Krause
Stefan Teleman
Stefan Ulrich
Stephan Bergmann
Stephen Collyer
@@ -629,6 +644,7 @@ Thomas J. Moore
Thomas Klausner
Thomas Schwinge
Thomas Tonino
Tim Ansell
Tim Baker
Tim Bartley
Tim Costello
@@ -666,6 +682,7 @@ Vincent Bronner
Vincent Le Normand
Vincent Penquerc'h
Vincent Sanders
Vlad Grachov
Vladimir Lazarenko
Vojtech Janota
Vojtech Minarik

View File

@@ -328,10 +328,10 @@ to provide the data to send.
8.1 Make NTLM work without OpenSSL functions
Get NTLM working using the functions provided by libgcrypt, since GnuTLS
already depends on that to function. Not strictly SSL/TLS related, but
hey... Another option is to get available DES and MD4 source code from the
cryptopp library. They are fine license-wise, but are C++.
Get NTLM working using the functions provided by NSS. Not strictly
SSL/TLS related, but hey... Another option is to get available DES and
MD4 source code from the cryptopp library. They are fine license-wise,
but are C++.
8.2 SSL engine stuff

View File

@@ -28,7 +28,7 @@ curl-config \- Get information about a libcurl installation
.B curl-config [options]
.SH DESCRIPTION
.B curl-config
displays information about a previous curl and libcurl installation.
displays information about the curl and libcurl installation.
.SH OPTIONS
.IP "--ca"
Displays the built-in path to the CA cert bundle this libcurl uses.
@@ -36,7 +36,7 @@ Displays the built-in path to the CA cert bundle this libcurl uses.
Displays the compiler used to build libcurl.
.IP "--cflags"
Set of compiler options (CFLAGS) to use when compiling files that use
libcurl. Currently that is only thw include path to the curl include files.
libcurl. Currently that is only the include path to the curl include files.
.IP "--checkfor [version]"
Specify the oldest possible libcurl version string you want, and this
script will return 0 if the current installation is new enough or it
@@ -46,7 +46,7 @@ enough. (Added in 7.15.4)
Lists what particular main features the installed libcurl was built with. At
the time of writing, this list may include SSL, KRB4 or IPv6. Do not assume
any particular order. The keywords will be separated by newlines. There may be
none, one or several keywords in the list.
none, one, or several keywords in the list.
.IP "--help"
Displays the available options.
.IP "--libs"
@@ -61,7 +61,7 @@ Lists what particular protocols the installed libcurl was built to support. At
the time of writing, this list may include HTTP, HTTPS, FTP, FTPS, FILE,
TELNET, LDAP, DICT. Do not assume any particular order. The protocols will
be listed using uppercase and are separated by newlines. There may be none,
one or several protocols in the list. (Added in 7.13.0)
one, or several protocols in the list. (Added in 7.13.0)
.IP "--static-libs"
Shows the complete set of libs and other linker options you will need in order
to link your application with libcurl statically. (Added in 7.17.1)

View File

@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -135,7 +135,7 @@ Pass the data to the HTTP server as a cookie. It is supposedly the
data previously received from the server in a "Set-Cookie:" line.
The data should be in the format "NAME1=VALUE1; NAME2=VALUE2".
If no '=' letter is used in the line, it is treated as a filename to use to
If no '=' symbol is used in the line, it is treated as a filename to use to
read previously stored cookie lines from, which should be used in this session
if they match. Using this method also activates the "cookie parser" which will
make curl record incoming cookies too, which may be handy if you're using this
@@ -197,7 +197,7 @@ If this option is used several times, the last specified file name will be
used.
.IP "-C/--continue-at <offset>"
Continue/Resume a previous file transfer at the given offset. The given offset
is the exact number of bytes that will be skipped counted from the beginning
is the exact number of bytes that will be skipped, counting from the beginning
of the source file before it is transferred to the destination. If used with
uploads, the FTP server command SIZE will not be used by curl.
@@ -228,7 +228,7 @@ of a form field you may use \fI--data-urlencode\fP.
If any of these options is used more than once on the same command line, the
data pieces specified will be merged together with a separating
&-letter. Thus, using '-d name=daniel -d skill=lousy' would generate a post
&-symbol. Thus, using '-d name=daniel -d skill=lousy' would generate a post
chunk that looks like \&'name=daniel&skill=lousy'.
If you start the data with the letter @, the rest should be a file name to
@@ -256,11 +256,11 @@ curl using one of the following syntaxes:
.RS
.IP "content"
This will make curl URL-encode the content and pass that on. Just be careful
so that the content doesn't contain any = or @ letters, as that will then make
so that the content doesn't contain any = or @ symbols, as that will then make
the syntax match one of the other cases below!
.IP "=content"
This will make curl URL-encode the content and pass that on. The preceding =
letter is not included in the data.
symbol is not included in the data.
.IP "name=content"
This will make curl URL-encode the content part and pass that on. Note that
the name part is expected to be URL-encoded already.
@@ -286,12 +286,16 @@ difference.
(FTP) Tell curl to disable the use of the EPRT and LPRT commands when doing
active FTP transfers. Curl will normally always first attempt to use EPRT,
then LPRT before using PORT, but with this option, it will use PORT right
away. EPRT and LPRT are extensions to the original FTP protocol, may not work
on all servers but enable more functionality in a better way than the
away. EPRT and LPRT are extensions to the original FTP protocol, and may not work
on all servers, but they enable more functionality in a better way than the
traditional PORT command.
Since curl 7.19.0, \fB--eprt\fP can be used to explicitly enable EPRT again
and \fB--no-eprt\fP is an alias for \fB--disable-eprt\fP.
Disabling EPRT only changes the active behavior. If you want to switch to
passive mode you need to not use \fI-P/--ftp-port\fP or force it with
\fI--ftp-pasv\fP.
.IP "--disable-epsv"
(FTP) Tell curl to disable the use of the EPSV command when doing passive FTP
transfers. Curl will normally always first attempt to use EPSV before PASV,
@@ -299,6 +303,9 @@ but with this option, it will not try using EPSV.
Since curl 7.19.0, \fB--epsv\fP can be used to explicitly enable EPRT again
and \fB--no-epsv\fP is an alias for \fB--disable-epsv\fP.
Disabling EPSV only changes the passive behavior. If you want to switch to
active mode you need to use \fI-P/--ftp-port\fP.
.IP "-D/--dump-header <file>"
Write the protocol headers to the specified file.
@@ -326,7 +333,7 @@ engines. Note that not all (or none) of the engines may be available at
run-time.
.IP "--environment"
(RISC OS ONLY) Sets a range of environment variables, using the names the -w
option supports, to easier allow extraction of useful information after having
option supports, to allow easier extraction of useful information after having
run curl.
.IP "--egd-file <file>"
(SSL) Specify the path name to the Entropy Gathering Daemon socket. The socket
@@ -421,13 +428,16 @@ compliant than 'nocwd' but without the full penalty of 'multicwd'.
.RE
(Added in 7.15.1)
.IP "--ftp-pasv"
(FTP) Use PASV when transferring. PASV is the internal default behavior, but
using this option can be used to override a previous --ftp-port option. (Added
in 7.11.0)
(FTP) Use passive mode for the data conection. Passive is the internal default
behavior, but using this option can be used to override a previous
\fI-P/-ftp-port\fP option. (Added in 7.11.0)
If this option is used several times, the following occurrences make no
difference. Undoing an enforced PASV really isn't doable but you must then
instead enforce the correct EPRT again.
difference. Undoing an enforced passive really isn't doable but you must then
instead enforce the correct \fI-P/--ftp-port\fP again.
Passive mode means that curl will try the EPSV command first and then PASV,
unless \fI--disable-epsv\fP is used.
.IP "--ftp-alternative-to-user <command>"
(FTP) If authenticating with the USER and PASS commands fails, send this
command. When connecting to Tumbleweed's Secure Transport server over FTPS
@@ -473,7 +483,7 @@ submit button. This causes curl to POST data using the Content-Type
multipart/form-data according to RFC1867. This enables uploading of binary
files etc. To force the 'content' part to be a file, prefix the file name
with an @ sign. To just get the content part from a file, prefix the file name
with the letter <. The difference between @ and < is then that @ makes a file
with the symbol <. The difference between @ and < is then that @ makes a file
get attached in the post as a file upload, while the < makes a text field and
just get the contents for that text field from a file.
@@ -732,7 +742,7 @@ re-send the following request using the same unmodified method.
.IP "--location-trusted"
(HTTP/HTTPS) Like \fI-L/--location\fP, but will allow sending the name +
password to all hosts that the site may redirect to. This may or may not
introduce a security breach if the site redirects you do a site to which
introduce a security breach if the site redirects you to a site to which
you'll send your authentication info (which is plaintext in the case of HTTP
Basic authentication).
@@ -776,7 +786,7 @@ Very similar to \fI--netrc\fP, but this option makes the .netrc usage
(HTTP) Enables GSS-Negotiate authentication. The GSS-Negotiate method was
designed by Microsoft and is used in their web applications. It is primarily
meant as a support for Kerberos5 authentication but may be also used along
with another authentication methods. For more information see IETF draft
with another authentication method. For more information see IETF draft
draft-brezak-spnego-http-04.txt.
If you want to enable Negotiate for your proxy authentication, then use
@@ -815,6 +825,13 @@ you to succeed. (Added in 7.16.0)
Note that this is the negated option name documented. You can thus use
\fI--sessionid\fP to enforce session-ID caching.
.IP "--noproxy <no-proxy-list>"
Comma-separated list of hosts which do not use a proxy, if one is specified.
The only wildcard is a single * character, which matches all hosts, and
effectively disables the proxy. Each name in this list is matched as either
a domain which contains the hostname, or the hostname itself. For example,
local.com would match local.com, local.com:80, and www.local.com, but not
www.notlocal.com. (Added in 7.19.4).
.IP "--ntlm"
(HTTP) Enables NTLM authentication. The NTLM authentication method was
designed by Microsoft and is used by IIS web servers. It is a proprietary
@@ -846,7 +863,8 @@ or use several variables like:
You may use this option as many times as the number of URLs you have.
See also the \fI--create-dirs\fP option to create the local directories
dynamically.
dynamically. Specifying the output as '-' (a single dash) will force the
output to be done to stdout.
.IP "-O/--remote-name"
Write output to a local file named like the remote file we get. (Only the file
part of the remote file is used, the path is cut off.)
@@ -875,7 +893,7 @@ a redirection. This option is meaningful only when using \fI-L/--location\fP
Tells curl to respect RFC 2616/10.3.2 and not convert POST requests into GET
requests when following a 302 redirection. The non-RFC behaviour is ubiquitous
in web browsers, so curl does the conversion by default to maintain
consistency. However, a server may requires a POST to remain a POST after such
consistency. However, a server may require a POST to remain a POST after such
a redirection. This option is meaningful only when using \fI-L/--location\fP
(Added in 7.19.1)
.IP "--proxy-anyauth"
@@ -896,6 +914,13 @@ with a remote host. (Added in 7.17.1)
.IP "--proxy-ntlm"
Tells curl to use HTTP NTLM authentication when communicating with the given
proxy. Use \fI--ntlm\fP for enabling NTLM with a remote host.
.IP "--proxy1.0 <proxyhost[:port]>"
Use the specified HTTP 1.0 proxy. If the port number is not specified, it is
assumed at port 1080.
The only difference between this and the HTTP proxy option (\fI-x/--proxy\fP),
is that attempts to use CONNECT through the proxy will specify an HTTP 1.0
protocol instead of the default HTTP 1.1.
.IP "-p/--proxytunnel"
When an HTTP proxy is used (\fI-x/--proxy\fP), this option will cause non-HTTP
protocols to attempt to tunnel through the proxy instead of merely using it to
@@ -908,11 +933,11 @@ separate file.
If this option is used several times, the last one will be used.
.IP "-P/--ftp-port <address>"
(FTP) Reverses the initiator/listener roles when connecting with FTP. This
switch makes Curl use the PORT command instead of PASV. In practice, PORT
tells the server to connect to the client's specified address and port, while
PASV asks the server for an IP address and port to connect to. <address>
should be one of:
(FTP) Reverses the default initiator/listener roles when connecting with
FTP. This switch makes curl use active mode. In practice, curl then tells the
server to connect back to the client's specified address and port, while
passive mode asks the server to setup an IP address and port for it to connect
to. <address> should be one of:
.RS
.IP interface
i.e "eth0" to specify which interface's IP address you want to use (Unix only)
@@ -1107,6 +1132,21 @@ mutually exclusive.
If this option is used several times, the last one will be used. (This option
was previously wrongly documented and used as --socks without the number
appended.)
.IP "--socks5-gssapi-service <servicename>"
The default service name for a socks server is rcmd/server-fqdn. This option
allows you to change it.
Examples:
--socks5 proxy-name \fI--socks5-gssapi-service\fP sockd would use
sockd/proxy-name
--socks5 proxy-name \fI--socks5-gssapi-service\fP sockd/real-name would use
sockd/real-name for cases where the proxy-name does not match the princpal name.
(Added in 7.19.4).
.IP "--socks5-gssapi-nec"
As part of the gssapi negotiation a protection mode is negotiated. The rfc1961
says in section 4.3/4.4 it should be protected, but the NEC reference
implementation does not. The option \fI--socks5-gssapi-nec\fP allows the
unprotected exchange of the protection mode negotiation. (Added in 7.19.4).
.IP "--stderr <file>"
Redirect all writes to stderr to the specified file instead. If the file name
is a plain '-', it is instead written to stdout. This option has no point when
@@ -1201,7 +1241,7 @@ received by curl that is hidden in normal cases, and a line starting with '*'
means additional info provided by curl.
Note that if you only want HTTP headers in the output, \fI-i/--include\fP
might be option you're looking for.
might be the option you're looking for.
If you think this option still doesn't give you enough details, consider using
\fI--trace\fP or \fI--trace-ascii\fP instead.
@@ -1255,12 +1295,12 @@ format from stdin you write "@-".
The variables present in the output format will be substituted by the value or
text that curl thinks fit, as described below. All variables are specified
as %{variable_name} and to output a normal % you just it them as
as %{variable_name} and to output a normal % you just write them as
%%. You can output a newline by using \\n, a carriage return with \\r and a tab
space with \\t.
.B NOTE:
The %-letter is a special letter in the win32-environment, where all
The %-symbol is a special symbol in the win32-environment, where all
occurrences of % must be doubled when using this option.
The variables available at this point are:
@@ -1456,7 +1496,7 @@ Sets the proxy server to use if no protocol-specific proxy is set.
list of host names that shouldn't go through any proxy. If set to a asterisk
\&'*' only, it matches all hosts.
.SH EXIT CODES
There exists a bunch of different error codes and their corresponding error
There are a bunch of different error codes and their corresponding error
messages that may appear during bad conditions. At the time of this writing,
the exit codes are:
.IP 1
@@ -1464,7 +1504,7 @@ Unsupported protocol. This build of curl has no support for this protocol.
.IP 2
Failed to initialize.
.IP 3
URL malformat. The syntax was not correct.
URL malformed. The syntax was not correct.
.IP 5
Couldn't resolve proxy. The given proxy host could not be resolved.
.IP 6
@@ -1545,67 +1585,67 @@ Unknown TELNET option specified.
.IP 49
Malformed telnet option.
.IP 51
The peer's SSL certificate or SSH MD5 fingerprint was not ok
The peer's SSL certificate or SSH MD5 fingerprint was not ok.
.IP 52
The server didn't reply anything, which here is considered an error.
.IP 53
SSL crypto engine not found
SSL crypto engine not found.
.IP 54
Cannot set SSL crypto engine as default
Cannot set SSL crypto engine as default.
.IP 55
Failed sending network data
Failed sending network data.
.IP 56
Failure in receiving network data
Failure in receiving network data.
.IP 58
Problem with the local certificate
Problem with the local certificate.
.IP 59
Couldn't use specified SSL cipher
Couldn't use specified SSL cipher.
.IP 60
Peer certificate cannot be authenticated with known CA certificates
Peer certificate cannot be authenticated with known CA certificates.
.IP 61
Unrecognized transfer encoding
Unrecognized transfer encoding.
.IP 62
Invalid LDAP URL
Invalid LDAP URL.
.IP 63
Maximum file size exceeded
Maximum file size exceeded.
.IP 64
Requested FTP SSL level failed
Requested FTP SSL level failed.
.IP 65
Sending the data requires a rewind that failed
Sending the data requires a rewind that failed.
.IP 66
Failed to initialise SSL Engine
Failed to initialise SSL Engine.
.IP 67
The user name, password, or similar was not accepted and curl failed to log in
The user name, password, or similar was not accepted and curl failed to log in.
.IP 68
File not found on TFTP server
File not found on TFTP server.
.IP 69
Permission problem on TFTP server
Permission problem on TFTP server.
.IP 70
Out of disk space on TFTP server
Out of disk space on TFTP server.
.IP 71
Illegal TFTP operation
Illegal TFTP operation.
.IP 72
Unknown TFTP transfer ID
Unknown TFTP transfer ID.
.IP 73
File already exists (TFTP)
File already exists (TFTP).
.IP 74
No such user (TFTP)
No such user (TFTP).
.IP 75
Character conversion failed
Character conversion failed.
.IP 76
Character conversion functions required
Character conversion functions required.
.IP 77
Problem with reading the SSL CA cert (path? access rights?)
Problem with reading the SSL CA cert (path? access rights?).
.IP 78
The resource referenced in the URL does not exist
The resource referenced in the URL does not exist.
.IP 79
An unspecified error occurred during the SSH session
An unspecified error occurred during the SSH session.
.IP 80
Failed to shut down the SSL connection
Failed to shut down the SSL connection.
.IP 82
Could not load CRL file, missing or wrong format (added in 7.19.0)
Could not load CRL file, missing or wrong format (added in 7.19.0).
.IP 83
Issuer check failed (added in 7.19.0)
Issuer check failed (added in 7.19.0).
.IP XX
More error codes will appear here in future releases. The existing ones
are meant to never change.

View File

@@ -21,6 +21,7 @@ int main(void)
struct curl_slist *chunk = NULL;
chunk = curl_slist_append(chunk, "Accept: moo");
chunk = curl_slist_append(chunk, "Another: yes");
/* request with the built-in Accept: */
curl_easy_setopt(curl, CURLOPT_URL, "localhost");

View File

@@ -60,8 +60,8 @@ PDFPAGES = curl_easy_cleanup.pdf curl_easy_getinfo.pdf curl_easy_init.pdf \
CLEANFILES = $(HTMLPAGES) $(PDFPAGES)
EXTRA_DIST = $(man_MANS) $(HTMLPAGES) index.html $(PDFPAGES) libcurl.m4 ABI
EXTRA_DIST = $(man_MANS) $(HTMLPAGES) index.html $(PDFPAGES) libcurl.m4 ABI \
symbols-in-versions
MAN2HTML= roffit --mandir=. < $< >$@
SUFFIXES = .3 .html

View File

@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -21,7 +21,7 @@
.\" * $Id$
.\" **************************************************************************
.\"
.TH curl_easy_getinfo 3 "16 Oct 2008" "libcurl 7.19.1" "libcurl Manual"
.TH curl_easy_getinfo 3 "11 Feb 2009" "libcurl 7.19.4" "libcurl Manual"
.SH NAME
curl_easy_getinfo - extract information from a curl handle
.SH SYNOPSIS
@@ -134,9 +134,11 @@ on the list pointer once you're done with it, as libcurl will not free the
data for you. (Added in 7.12.3)
.IP CURLINFO_CONTENT_LENGTH_DOWNLOAD
Pass a pointer to a double to receive the content-length of the download. This
is the value read from the Content-Length: field.
is the value read from the Content-Length: field. Since 7.19.4, this returns -1
if the size isn't known.
.IP CURLINFO_CONTENT_LENGTH_UPLOAD
Pass a pointer to a double to receive the specified size of the upload.
Pass a pointer to a double to receive the specified size of the upload. Since
7.19.4, this returns -1 if the size isn't known.
.IP CURLINFO_CONTENT_TYPE
Pass a pointer to a 'char *' to receive the content-type of the downloaded
object. This is the value read from the Content-Type: field. If you get NULL,
@@ -200,6 +202,12 @@ provided in a series of data in the format "name:content" where the content is
for the specific named data. See also the certinfo.c example. NOTE: this
option is only available in libcurl built with OpenSSL support. (Added in
7.19.1)
.IP CURLINFO_CONDITION_UNMET
Pass a pointer to a long to receive the number 1 if the condition provided in
the previous request didn't match (see \fICURLOPT_TIMECONDITION\fP). Alas, if
this returns a 1 you know that the reason you didn't get data in return is
because it didn't fulfill the condition. The long ths argument points to will
get a zero stored if the condition instead was met. (Added in 7.19.4)
.SH TIMES
.NF
An overview of the six time values available from curl_easy_getinfo()

View File

@@ -31,7 +31,7 @@ the connection you want to pause or unpause.
The \fBbitmask\fP argument is a set of bits that sets the new state of the
connection. The following bits can be used:
.IP CURLPAUSE_RECV
Pause receiving data. There will be no data received on this conneciton until
Pause receiving data. There will be no data received on this connection until
this function is called again without this bit set. Thus, the write callback
(\fICURLOPT_WRITEFUNCTION\fP) won't be called.
.IP CURLPAUSE_SEND

View File

@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -21,7 +21,7 @@
.\" * $Id$
.\" **************************************************************************
.\"
.TH curl_easy_setopt 3 "28 Oct 2008" "libcurl 7.19.1" "libcurl Manual"
.TH curl_easy_setopt 3 "11 Dec 2008" "libcurl 7.19.3" "libcurl Manual"
.SH NAME
curl_easy_setopt \- set options for a curl easy handle
.SH SYNOPSIS
@@ -72,7 +72,7 @@ preceding the data (like HTTP).
A parameter set to 1 tells the library to shut off the built-in progress meter
completely.
Future versions of libcurl is likely to not have any built-in progress meter
Future versions of libcurl are likely to not have any built-in progress meter
at all.
.IP CURLOPT_NOSIGNAL
Pass a long. If it is 1, libcurl will not use any functions that
@@ -83,7 +83,7 @@ to still set/use all timeout options etc, without risking getting signals.
If this option is set and libcurl has been built with the standard name
resolver, timeouts will not occur while the name resolve takes place.
Consider building libcurl with ares support to enable asynchronous DNS
Consider building libcurl with c-ares support to enable asynchronous DNS
lookups, which enables nice timeouts for name resolves without signals.
.PP
.SH CALLBACK OPTIONS
@@ -101,7 +101,7 @@ From 7.18.0, the function can return CURL_WRITEFUNC_PAUSE which then will
cause writing to this connection to become paused. See
\fIcurl_easy_pause(3)\fP for further details.
This function may be called with zero bytes data if the transfered file is
This function may be called with zero bytes data if the transferred file is
empty.
Set this option to NULL to get the internal default function. The internal
@@ -140,7 +140,7 @@ that memory area. Returning 0 will signal end-of-file to the library and cause
it to stop the current transfer.
If you stop the current transfer by returning 0 "pre-maturely" (i.e before the
server expected it, like when you've told you will upload N bytes and you
server expected it, like when you've said you will upload N bytes and you
upload less than N bytes), you may experience that the server "hangs" waiting
for the rest of the data that won't come.
@@ -152,7 +152,7 @@ From 7.18.0, the function can return CURL_READFUNC_PAUSE which then will cause
reading from this connection to become paused. See \fIcurl_easy_pause(3)\fP
for further details.
If you set the callback pointer to NULL, or doesn't set it at all, the default
If you set the callback pointer to NULL, or don't set it at all, the default
internal read function will be used. It is simply doing an fread() on the FILE
* stream set with \fICURLOPT_READDATA\fP.
.IP CURLOPT_READDATA
@@ -164,7 +164,7 @@ read function, this data must be a valid readable FILE *.
If you're using libcurl as a win32 DLL, you MUST use a
\fICURLOPT_READFUNCTION\fP if you set this option.
This option is also known with the older name \fICURLOPT_INFILE\fP, the name
This option was also known by the older name \fICURLOPT_INFILE\fP, the name
\fICURLOPT_READDATA\fP was introduced in 7.9.7.
.IP CURLOPT_IOCTLFUNCTION
Function pointer that should match the \fIcurl_ioctl_callback\fP prototype
@@ -336,7 +336,7 @@ This function will get called on all new connections made to a server, during
the SSL negotiation. The SSL_CTX pointer will be a new one every time.
To use this properly, a non-trivial amount of knowledge of the openssl
libraries is necessary. Using this function allows for example to use openssl
libraries is necessary. For example, using this function allows you to use openssl
callbacks to add additional validation code for certificates, and even to
change the actual URI of an HTTPS request (example used in the lib509 test
case). See also the example section for a replacement of the key, certificate
@@ -421,7 +421,7 @@ response codes will slip through, especially when authentication is involved
(response codes 401 and 407).
You might get some amounts of headers transferred before this situation is
detected, like for when a "100-continue" is received as a response to a
detected, like when a "100-continue" is received as a response to a
POST/PUT and a 401 or 407 is received immediately afterwards.
.SH NETWORK OPTIONS
.IP CURLOPT_URL
@@ -433,19 +433,40 @@ attempt to guess which protocol to use based on the given host name. If the
given protocol of the set URL is not supported, libcurl will return on error
(\fICURLE_UNSUPPORTED_PROTOCOL\fP) when you call \fIcurl_easy_perform(3)\fP or
\fIcurl_multi_perform(3)\fP. Use \fIcurl_version_info(3)\fP for detailed info
on which protocols that are supported.
on which protocols are supported.
The string given to CURLOPT_URL must be url-encoded and following the RFC 2396
The string given to CURLOPT_URL must be url-encoded and follow RFC 2396
(http://curl.haxx.se/rfc/rfc2396.txt).
\fICURLOPT_URL\fP is the only option that \fBmust\fP be set before
\fIcurl_easy_perform(3)\fP is called.
\fICURLOPT_PROTOCOLS\fP can be used to limit what protocols libcurl will use
for this transfer, independent of what libcurl has been compiled to
support. That may be useful if you accept the URL from an external source and
want to limit the accessibility.
.IP CURLOPT_PROTOCOLS
Pass a long that holds a bitmask of CURLPROTO_* defines. If used, this bitmask
limits what protocols libcurl may use in the transfer. This allows you to have
a libcurl built to support a wide range of protocols but still limit specific
transfers to only be allowed to use a subset of them. By default libcurl will
accept all protocols it supports. See also
\fICURLOPT_REDIR_PROTOCOLS\fP. (Added in 7.19.4)
.IP CURLOPT_REDIR_PROTOCOLS
Pass a long that holds a bitmask of CURLPROTO_* defines. If used, this bitmask
limits what protocols libcurl may use in a transfer that it follows to in a
redirect when \fICURLOPT_FOLLOWLOCATION\fP is enabled. This allows you to
limit specific transfers to only be allowed to use a subset of protocols in
redirections. By default libcurl will allow all protocols except for FILE and
SCP. This is a difference compared to pre-7.19.4 versions which
unconditionally would follow to all protocols supported. (Added in 7.19.4)
.IP CURLOPT_PROXY
Set HTTP proxy to use. The parameter should be a char * to a zero terminated
string holding the host name or dotted IP address. To specify port number in
this string, append :[port] to the end of the host name. The proxy string may
be prefixed with [protocol]:// since any such prefix will be ignored. The
proxy's port number may optionally be specified with the separate option
proxy's port number may optionally be specified with the separate option. If
not specified, libcurl will default to using port 1080 for proxies.
\fICURLOPT_PROXYPORT\fP.
When you tell the library to use an HTTP proxy, libcurl will transparently
@@ -456,7 +477,7 @@ tunnel through the HTTP proxy. Such tunneling is activated with
\fICURLOPT_HTTPPROXYTUNNEL\fP.
libcurl respects the environment variables \fBhttp_proxy\fP, \fBftp_proxy\fP,
\fBall_proxy\fP etc, if any of those is set. The \fICURLOPT_PROXY\fP option
\fBall_proxy\fP etc, if any of those are set. The \fICURLOPT_PROXY\fP option
does however override any possibly set environment variables.
Setting the proxy string to "" (an empty string) will explicitly disable the
@@ -470,26 +491,44 @@ Pass a long with this option to set the proxy port to connect to unless it is
specified in the proxy string \fICURLOPT_PROXY\fP.
.IP CURLOPT_PROXYTYPE
Pass a long with this option to set type of the proxy. Available options for
this are \fICURLPROXY_HTTP\fP, \fICURLPROXY_SOCKS4\fP (added in 7.15.2),
\fICURLPROXY_SOCKS5\fP, \fICURLPROXY_SOCKS4A\fP (added in 7.18.0) and
\fICURLPROXY_SOCKS5_HOSTNAME\fP (added in 7.18.0). The HTTP type is
default. (Added in 7.10)
this are \fICURLPROXY_HTTP\fP, \fICURLPROXY_HTTP_1_0\fP (added in 7.19.4),
\fICURLPROXY_SOCKS4\fP (added in 7.15.2), \fICURLPROXY_SOCKS5\fP,
\fICURLPROXY_SOCKS4A\fP (added in 7.18.0) and \fICURLPROXY_SOCKS5_HOSTNAME\fP
(added in 7.18.0). The HTTP type is default. (Added in 7.10)
.IP CURLOPT_NOPROXY
Pass a pointer to a zero terminated string. The should be a comma- separated
list of hosts which do not use a proxy, if one is specified. The only
wildcard is a single * character, which matches all hosts, and effectively
disables the proxy. Each name in this list is matched as either a domain which
contains the hostname, or the hostname itself. For example, local.com would
match local.com, local.com:80, and www.local.com, but not www.notlocal.com.
(Added in 7.19.4)
.IP CURLOPT_HTTPPROXYTUNNEL
Set the parameter to 1 to make the library tunnel all operations through a
given HTTP proxy. There is a big difference between using a proxy and to
tunnel through it. If you don't know what this means, you probably don't want
this tunneling option.
.IP CURLOPT_SOCKS5_GSSAPI_SERVICE
Pass a char * as parameter to a string holding the name of the service. The
default service name for a SOCKS5 server is rcmd/server-fqdn. This option
allows you to change it. (Added in 7.19.4)
.IP CURLOPT_SOCKS5_GSSAPI_NEC
Pass a long set to 1 to enable or 0 to disable. As part of the gssapi
negotiation a protection mode is negotiated. The rfc1961 says in section
4.3/4.4 it should be protected, but the NEC reference implementation does not.
If enabled, this option allows the unprotected exchange of the protection mode
negotiation. (Added in 7.19.4).
.IP CURLOPT_INTERFACE
Pass a char * as parameter. This set the interface name to use as outgoing
network interface. The name can be an interface name, an IP address or a host
Pass a char * as parameter. This sets the interface name to use as outgoing
network interface. The name can be an interface name, an IP address, or a host
name.
.IP CURLOPT_LOCALPORT
Pass a long. This sets the local port number of the socket used for
connection. This can be used in combination with \fICURLOPT_INTERFACE\fP and
you are recommended to use \fICURLOPT_LOCALPORTRANGE\fP as well when this is
set. Note that port numbers are only valid 1 - 65535. (Added in 7.15.2)
set. Note that the only valid port numbers are 1 - 65535. (Added in 7.15.2)
.IP CURLOPT_LOCALPORTRANGE
Pass a long. This is the number of attempts libcurl should do to find a
Pass a long. This is the number of attempts libcurl should make to find a
working local port number. It starts with the given \fICURLOPT_LOCALPORT\fP
and adds one to the number for each retry. Setting this to 1 or below will
make libcurl do only one try for the exact port number. Note that port numbers
@@ -503,8 +542,8 @@ caching, or set to -1 to make the cached entries remain forever. By default,
libcurl caches this info for 60 seconds.
NOTE: the name resolve functions of various libc implementations don't re-read
name server information unless explicitly told so (by for example calling
\fIres_init(3)\fP. This may cause libcurl to keep using the older server even
name server information unless explicitly told so (for example, by calling
\fIres_init(3)\fP). This may cause libcurl to keep using the older server even
if DHCP has updated the server info, and this may look like a DNS cache issue
to the casual libcurl-app user.
.IP CURLOPT_DNS_USE_GLOBAL_CACHE
@@ -545,7 +584,7 @@ data at a time, and can contribute to congestion on the network if
overdone.
.IP CURLOPT_ADDRESS_SCOPE
Pass a long specifying the scope_id value to use when connecting to IPv6
link-local or site-local addresses.
link-local or site-local addresses. (Added in 7.19.0)
.SH NAMES and PASSWORDS OPTIONS (Authentication)
.IP CURLOPT_NETRC
This parameter controls the preference of libcurl between using user names and
@@ -560,8 +599,8 @@ Pass a long, set to one of the values described below.
.RS
.IP CURL_NETRC_OPTIONAL
The use of your \fI~/.netrc\fP file is optional, and information in the URL is
to be preferred. The file will be scanned with the host and user name (to
find the password only) or with the host only, to find the first user name and
to be preferred. The file will be scanned for the host and user name (to
find the password only) or for the host only, to find the first user name and
password after that \fImachine\fP, which ever information is not specified in
the URL.
@@ -572,7 +611,7 @@ The library will ignore the file and use only the information in the URL.
This is the default.
.IP CURL_NETRC_REQUIRED
This value tells the library that use of the file is required, to ignore the
information in the URL, and to search the file with the host only.
information in the URL, and to search the file for the host only.
.RE
Only machine name, user name and password are taken into account
(init macros and similar things aren't supported).
@@ -586,9 +625,9 @@ option is omitted, and \fICURLOPT_NETRC\fP is set, libcurl will attempt to
find a .netrc file in the current user's home directory. (Added in 7.10.9)
.IP CURLOPT_USERPWD
Pass a char * as parameter, which should be [user name]:[password] to use for
the connection. Use \fICURLOPT_HTTPAUTH\fP to decide authentication method.
the connection. Use \fICURLOPT_HTTPAUTH\fP to decide the authentication method.
When using NTLM, you can set domain by prepending it to the user name and
When using NTLM, you can set the domain by prepending it to the user name and
separating the domain and name with a forward (/) or backward slash (\\). Like
this: "domain/user:password" or "domain\\user:password". Some HTTP servers (on
Windows) support this style even for Basic authentication.
@@ -602,17 +641,14 @@ to prevent accidental information leakage.
.IP CURLOPT_PROXYUSERPWD
Pass a char * as parameter, which should be [user name]:[password] to use for
the connection to the HTTP proxy. Use \fICURLOPT_PROXYAUTH\fP to decide
authentication method.
the authentication method.
.IP CURLOPT_USERNAME
Pass a char * as parameter, which should be pointing to the zero terminated
user name to use for the transfer.
The CURLOPT_USERNAME option should be used in same way as the
\fICURLOPT_USERPWD\fP is used. In comparison to \fICURLOPT_USERPWD\fP the
CURLOPT_USERNAME allows the username to contain colon, like in following
example: "sip:user@example.com". Note the CURLOPT_USERNAME option is an
alternative way to set the user name. There is no meaning to use it together
with the \fICURLOPT_USERPWD\fP option.
\fBCURLOPT_USERNAME\fP sets the user name to be used in protocol
authentication. You should not use this option together with the (older)
CURLOPT_USERPWD option.
In order to specify the password to be used in conjunction with the user name
use the \fICURLOPT_PASSWORD\fP option. (Added in 7.19.1)
@@ -621,15 +657,15 @@ Pass a char * as parameter, which should be pointing to the zero terminated
password to use for the transfer.
The CURLOPT_PASSWORD option should be used in conjunction with
as the \fICURLOPT_USERNAME\fP option. (Added in 7.19.1)
the \fICURLOPT_USERNAME\fP option. (Added in 7.19.1)
.IP CURLOPT_PROXYUSERNAME
Pass a char * as parameter, which should be pointing to the zero terminated
user name to use for the transfer while connecting to Proxy.
The CURLOPT_PROXYUSERNAME option should be used in same way as the
\fICURLOPT_PROXYUSERPWD\fP is used. In comparison to \fICURLOPT_PROXYUSERPWD\fP
the CURLOPT_PROXYUSERNAME allows the username to contain colon,
like in following example: "sip:user@example.com".
the CURLOPT_PROXYUSERNAME allows the username to contain a colon,
like in the following example: "sip:user@example.com".
Note the CURLOPT_PROXYUSERNAME option is an alternative way to set the user name
while connecting to Proxy. There is no meaning to use it together
with the \fICURLOPT_PROXYUSERPWD\fP option.
@@ -641,12 +677,12 @@ Pass a char * as parameter, which should be pointing to the zero terminated
password to use for the transfer while connecting to Proxy.
The CURLOPT_PROXYPASSWORD option should be used in conjunction with
as the \fICURLOPT_PROXYUSERNAME\fP option. (Added in 7.19.1)
the \fICURLOPT_PROXYUSERNAME\fP option. (Added in 7.19.1)
.IP CURLOPT_HTTPAUTH
Pass a long as parameter, which is set to a bitmask, to tell libcurl what
Pass a long as parameter, which is set to a bitmask, to tell libcurl which
authentication method(s) you want it to use. The available bits are listed
below. If more than one bit is set, libcurl will first query the site to see
what authentication methods it supports and then pick the best one you allow
which authentication methods it supports and then pick the best one you allow
it to use. For some methods, this will induce an extra network round-trip. Set
the actual name and password with the \fICURLOPT_USERPWD\fP option or
with the \fICURLOPT_USERNAME\fP and the \fICURLOPT_USERPASSWORD\fP options.
@@ -654,18 +690,25 @@ with the \fICURLOPT_USERNAME\fP and the \fICURLOPT_USERPASSWORD\fP options.
.RS
.IP CURLAUTH_BASIC
HTTP Basic authentication. This is the default choice, and the only method
that is in wide-spread use and supported virtually everywhere. This is sending
that is in wide-spread use and supported virtually everywhere. This sends
the user name and password over the network in plain text, easily captured by
others.
.IP CURLAUTH_DIGEST
HTTP Digest authentication. Digest authentication is defined in RFC2617 and
is a more secure way to do authentication over public networks than the
regular old-fashioned Basic method.
.IP CURLAUTH_DIGEST_IE
HTTP Digest authentication with an IE flavor. Digest authentication is
defined in RFC2617 and is a more secure way to do authentication over public
networks than the regular old-fashioned Basic method. The IE flavor is simply
that libcurl will use a special "quirk" that IE is known to have used before
version 7 and that some servers require the client to use. (This define was
added in 7.19.3)
.IP CURLAUTH_GSSNEGOTIATE
HTTP GSS-Negotiate authentication. The GSS-Negotiate (also known as plain
\&"Negotiate") method was designed by Microsoft and is used in their web
applications. It is primarily meant as a support for Kerberos5 authentication
but may be also used along with another authentication methods. For more
but may also be used along with other authentication methods. For more
information see IETF draft draft-brezak-spnego-http-04.txt.
You need to build libcurl with a suitable GSS-API library for this to work.
@@ -686,7 +729,7 @@ libcurl pick any it finds suitable. libcurl will automatically select the one it
finds most secure.
.RE
.IP CURLOPT_PROXYAUTH
Pass a long as parameter, which is set to a bitmask, to tell libcurl what
Pass a long as parameter, which is set to a bitmask, to tell libcurl which
authentication method(s) you want it to use for your proxy authentication. If
more than one bit is set, libcurl will first query the site to see what
authentication methods it supports and then pick the best one you allow it to
@@ -720,6 +763,10 @@ This means that the library will re-send the same request on the new location
and follow new Location: headers all the way until no more such headers are
returned. \fICURLOPT_MAXREDIRS\fP can be used to limit the number of redirects
libcurl will follow.
NOTE: since 7.19.4, libcurl can limit to what protocols it will automatically
follow. The accepted protocols are set with \fICURLOPT_REDIR_PROTOCOLS\fP and
it excludes the FILE protocol by default.
.IP CURLOPT_UNRESTRICTED_AUTH
A parameter set to 1 tells the library it can continue to send authentication
(user+password) when following locations, even when hostname changed. This
@@ -732,13 +779,20 @@ redirections have been followed, the next redirect will cause an error
Setting the limit to 0 will make libcurl refuse any redirect. Set it to -1 for
an infinite number of redirects (which is the default)
.IP CURLOPT_POSTREDIR
A parameter set to 1 tells the library to respect RFC 2616/10.3.2 and not
convert POST requests into GET requests when following a 301 redirection. The
non-RFC behaviour is ubiquitous in web browsers, so the library does the
conversion by default to maintain consistency. However, a server may requires
a POST to remain a POST after such a redirection. This option is meaningful
only when setting \fICURLOPT_FOLLOWLOCATION\fP. (Added in 7.17.1)
(This option was known as CURLOPT_POST301 up to 7.19.0)
Pass a bitmask to control how libcurl acts on redirects after POSTs that get a
301 or 302 response back. A parameter with bit 0 set (value
\fBCURL_REDIR_POST_301\fP) tells the library to respect RFC 2616/10.3.2 and
not convert POST requests into GET requests when following a 301
redirection. Setting bit 1 (value CURL_REDIR_POST_302) makes libcurl maintain
the request method after a 302 redirect. CURL_REDIR_POST_ALL is a convenience
define that sets both bits.
The non-RFC behaviour is ubiquitous in web browsers, so the library does the
conversion by default to maintain consistency. However, a server may require a
POST to remain a POST after such a redirection. This option is meaningful only
when setting \fICURLOPT_FOLLOWLOCATION\fP. (Added in 7.17.1) (This option was
known as CURLOPT_POST301 up to 7.19.0 as it only supported the 301 way before
then)
.IP CURLOPT_PUT
A parameter set to 1 tells the library to use HTTP PUT to transfer data. The
data should be set with \fICURLOPT_READDATA\fP and \fICURLOPT_INFILESIZE\fP.
@@ -832,11 +886,10 @@ copy. In any case, the size must not be changed after
\fICURLOPT_COPYPOSTFIELDS\fP, unless another \fICURLOPT_POSTFIELDS\fP or
\fICURLOPT_COPYPOSTFIELDS\fP option is issued.
(Added in 7.17.1)
.IP CURLOPT_HTTPPOST
Tells libcurl you want a multipart/formdata HTTP POST to be made and you
instruct what data to pass on to the server. Pass a pointer to a linked list
of curl_httppost structs as parameter. . The easiest way to create such a
of curl_httppost structs as parameter. The easiest way to create such a
list, is to use \fIcurl_formadd(3)\fP as documented. The data in this list
must remain intact until you close this curl handle again with
\fIcurl_easy_cleanup(3)\fP.
@@ -863,10 +916,10 @@ curl_slist\fP structs properly filled in. Use \fIcurl_slist_append(3)\fP to
create the list and \fIcurl_slist_free_all(3)\fP to clean up an entire
list. If you add a header that is otherwise generated and used by libcurl
internally, your added one will be used instead. If you add a header with no
contents as in 'Accept:' (no data on the right side of the colon), the
content as in 'Accept:' (no data on the right side of the colon), the
internally used header will get disabled. Thus, using this option you can add
new headers, replace internal headers and remove internal headers. To add a
header with no contents, make the contents be two quotes: \&"". The headers
header with no content, make the content be two quotes: \&"". The headers
included in the linked list must not be CRLF-terminated, because curl adds
CRLF after each header item. Failure to comply with this will result in
strange bugs because the server will most likely ignore part of the headers
@@ -920,7 +973,7 @@ dumped to a file.
Given an empty or non-existing file or by passing the empty string (""), this
option will enable cookies for this curl handle, making it understand and
parse received cookies and then use matching cookies in future request.
parse received cookies and then use matching cookies in future requests.
If you use this option multiple times, you just add more files to read.
Subsequent files will add more cookies.
@@ -941,7 +994,7 @@ about this possibly lethal situation.
Pass a long set to 1 to mark this as a new cookie "session". It will force
libcurl to ignore all cookies it is about to load that are "session cookies"
from the previous session. By default, libcurl always stores and loads all
cookies, independent if they are session cookies are not. Session cookies are
cookies, independent if they are session cookies or not. Session cookies are
cookies without expiry date and they are meant to be alive and existing for
this "session" only.
.IP CURLOPT_COOKIELIST
@@ -955,7 +1008,7 @@ all cookies known by cURL to the file specified by \fICURLOPT_COOKIEJAR\fP.
(Added in 7.17.1)
.IP CURLOPT_HTTPGET
Pass a long. If the long is 1, this forces the HTTP request to get back
to GET. usable if a POST, HEAD, PUT or a custom request have been used
to GET. Usable if a POST, HEAD, PUT, or a custom request has been used
previously using the same curl handle.
When setting \fICURLOPT_HTTPGET\fP to 1, it will automatically set
@@ -989,20 +1042,28 @@ Pass a long to tell libcurl how to act on transfer decoding. If set to zero,
transfer decoding will be disabled, if set to 1 it is enabled
(default). libcurl does chunked transfer decoding by default unless this
option is set to zero. (added in 7.16.2)
.SH TFTP OPTIONS
.IP CURLOPT_TFTPBLKSIZE
Specify block size to use for TFTP data transmission. Valid range as per RFC
2348 is 8-65464 bytes. The default of 512 bytes will be used if this option is
not specified. The specified block size will only be used pending support by
the remote server. If the server does not return an option acknowledgement or
returns an option acknowledgement with no blksize, the default of 512 bytes
will be used. (added in 7.19.4)
.SH FTP OPTIONS
.IP CURLOPT_FTPPORT
Pass a pointer to a zero terminated string as parameter. It will be used to
get the IP address to use for the ftp PORT instruction. The PORT instruction
get the IP address to use for the FTP PORT instruction. The PORT instruction
tells the remote server to connect to our specified IP address. The string may
be a plain IP address, a host name, an network interface name (under Unix) or
just a '-' letter to let the library use your systems default IP
be a plain IP address, a host name, a network interface name (under Unix) or
just a '-' symbol to let the library use your system's default IP
address. Default FTP operations are passive, and thus won't use PORT.
You disable PORT again and go back to using the passive version by setting
this option to NULL.
.IP CURLOPT_QUOTE
Pass a pointer to a linked list of FTP or SFTP commands to pass to
the server prior to your ftp request. This will be done before any
the server prior to your FTP request. This will be done before any
other commands are issued (even before the CWD command for FTP). The
linked list should be a fully valid list of 'struct curl_slist' structs
properly filled in with text strings. Use \fIcurl_slist_append(3)\fP
@@ -1017,7 +1078,7 @@ rename, rm, rmdir, symlink (see
(SFTP support added in 7.16.3)
.IP CURLOPT_POSTQUOTE
Pass a pointer to a linked list of FTP or SFTP commands to pass to the
server after your ftp transfer request. The linked list should be a
server after your FTP transfer request. The linked list should be a
fully valid list of struct curl_slist structs properly filled in as
described for \fICURLOPT_QUOTE\fP. Disable this operation again by
setting a NULL to this option.
@@ -1040,7 +1101,7 @@ might not include subdirectories and symbolic links.
(This option was known as CURLOPT_FTPLISTONLY up to 7.16.4)
.IP CURLOPT_APPEND
A parameter set to 1 tells the library to append to the remote file instead of
overwrite it. This is only useful when uploading to an ftp site.
overwrite it. This is only useful when uploading to an FTP site.
(This option was known as CURLOPT_FTPAPPEND up to 7.16.4)
.IP CURLOPT_FTP_USE_EPRT
@@ -1067,6 +1128,17 @@ This setting also applies to SFTP-connections. curl will attempt to create
the remote directory if it can't obtain a handle to the target-location. The
creation will fail if a file of the same name as the directory to create
already exists or lack of permissions prevents creation. (Added in 7.16.3)
Starting with 7.19.4, you can also set this value to 2, which will make
libcurl retry the CWD command again if the subsequent MKD command fails. 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! 7.19.4 also introduced the \fICURLFTP_CREATE_DIR\fP and
\fICURLFTP_CREATE_DIR_RETRY\fP enum names for these arguments.
Before version 7.19.4, libcurl will simply ignore arguments set to 2 and act
as if 1 was selected.
.IP CURLOPT_FTP_RESPONSE_TIMEOUT
Pass a long. Causes curl to set a timeout period (in seconds) on the amount
of time that the server is allowed to take in order to generate a response
@@ -1091,7 +1163,7 @@ from the 227-response. (Added in 7.14.2)
This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
.IP CURLOPT_USE_SSL
Pass a long using one of the values from below, to make libcurl use your
desired level of SSL for the ftp transfer. (Added in 7.11.0)
desired level of SSL for the FTP transfer. (Added in 7.11.0)
(This option was known as CURLOPT_FTP_SSL up to 7.16.4, and the constants
were known as CURLFTPSSL_*)
@@ -1111,11 +1183,11 @@ Pass a long using one of the values from below, to alter how libcurl issues
\fICURLOPT_USE_SSL\fP). (Added in 7.12.2)
.RS
.IP CURLFTPAUTH_DEFAULT
Allow libcurl to decide
Allow libcurl to decide.
.IP CURLFTPAUTH_SSL
Try "AUTH SSL" first, and only if that fails try "AUTH TLS"
Try "AUTH SSL" first, and only if that fails try "AUTH TLS".
.IP CURLFTPAUTH_TLS
Try "AUTH TLS" first, and only if that fails try "AUTH SSL"
Try "AUTH TLS" first, and only if that fails try "AUTH SSL".
.RE
.IP CURLOPT_FTP_SSL_CCC
If enabled, this option makes libcurl use CCC (Clear Command Channel). It
@@ -1143,7 +1215,7 @@ argument should be one of the following alternatives:
.RS
.IP CURLFTPMETHOD_MULTICWD
libcurl does a single CWD operation for each path part in the given URL. For
deep hierarchies this means very many commands. This is how RFC1738 says it
deep hierarchies this means many commands. This is how RFC1738 says it
should be done. This is the default but the slowest behavior.
.IP CURLFTPMETHOD_NOCWD
libcurl does no CWD at all. libcurl will do SIZE, RETR, STOR etc and give a
@@ -1153,9 +1225,10 @@ libcurl does one CWD with the full target directory and then operates on the
file \&"normally" (like in the multicwd case). This is somewhat more standards
compliant than 'nocwd' but without the full penalty of 'multicwd'.
.RE
(Added in 7.15.1)
.SH PROTOCOL OPTIONS
.IP CURLOPT_TRANSFERTEXT
A parameter set to 1 tells the library to use ASCII mode for ftp transfers,
A parameter set to 1 tells the library to use ASCII mode for FTP transfers,
instead of the default binary transfer. For win32 systems it does not set the
stdout to binary mode. This option can be usable when transferring text data
between systems with different views on certain characters, such as newlines
@@ -1163,7 +1236,7 @@ or similar.
libcurl does not do a complete ASCII conversion when doing ASCII transfers
over FTP. This is a known limitation/flaw that nobody has rectified. libcurl
simply sets the mode to ascii and performs a standard transfer.
simply sets the mode to ASCII and performs a standard transfer.
.IP CURLOPT_PROXY_TRANSFER_MODE
Pass a long. If the value is set to 1 (one), it tells libcurl to set the
transfer mode (binary or ASCII) for FTP transfers done via an HTTP proxy, by
@@ -1194,16 +1267,21 @@ you want the transfer to start from. (Added in 7.11.0)
.IP CURLOPT_CUSTOMREQUEST
Pass a pointer to a zero terminated string as parameter. It will be used
instead of GET or HEAD when doing an HTTP request, or instead of LIST or NLST
when doing an ftp directory listing. This is useful for doing DELETE or other
when doing a FTP directory listing. This is useful for doing DELETE or other
more or less obscure HTTP requests. Don't do this at will, make sure your
server supports the command first.
Note that libcurl will still act and assume the keyword it would use if you
didn't set your custom one is the one in use and it will act according to
that. Thus, changing this to a HEAD when libcurl otherwise would do a GET
might cause libcurl to act funny, and similar. To switch to a proper HEAD, use
\fICURLOPT_NOBODY\fP, to switch to a proper POST, use \fICURLOPT_POST\fP or
\fICURLOPT_POSTFIELDS\fP and so on.
When you change the request method by setting \fBCURLOPT_CUSTOMREQUEST\fP to
something, you don't actually change how libcurl behaves or acts in regards to
the particular request method, it will only change the actual string sent in
the request.
For example: if you tell libcurl to do a HEAD request, but then change the
request to a "GET" with \fBCURLOPT_CUSTOMREQUEST\fP you'll still see libcurl
act as if it sent a HEAD even when it does send a GET.
To switch to a proper HEAD, use \fICURLOPT_NOBODY\fP, to switch to a proper
POST, use \fICURLOPT_POST\fP or \fICURLOPT_POSTFIELDS\fP and so on.
Restore to the internal default by setting this to NULL.
@@ -1284,10 +1362,12 @@ value is treated. You can set this parameter to \fICURL_TIMECOND_IFMODSINCE\fP
or \fICURL_TIMECOND_IFUNMODSINCE\fP. This feature applies to HTTP and FTP.
The last modification time of a file is not always known and in such instances
this feature will have no effect even if the given time condition would have
not been met.
this feature will have no effect even if the given time condition would not
have been met. \fIcurl_easy_getinfo(3)\fP with the
\fICURLINFO_CONDITION_UNMET\fP option can be used after a transfer to learn if
a zero-byte successful "transfer" was due to this condition not matching.
.IP CURLOPT_TIMEVALUE
Pass a long as parameter. This should be the time in seconds since 1 jan 1970,
Pass a long as parameter. This should be the time in seconds since 1 Jan 1970,
and the time will be used in a condition as specified with
\fICURLOPT_TIMECONDITION\fP.
.SH CONNECTION OPTIONS
@@ -1328,19 +1408,19 @@ value. Defaults to unlimited speed. (Added in 7.15.5)
Pass a long. The set number will be the persistent connection cache size. The
set amount will be the maximum amount of simultaneously open connections that
libcurl may cache in this easy handle. Default is 5, and there isn't much
point in changing this value unless you are perfectly aware of how this work
and changes libcurl's behaviour. This concerns connection using any of the
point in changing this value unless you are perfectly aware of how this works
and changes libcurl's behaviour. This concerns connections using any of the
protocols that support persistent connections.
When reaching the maximum limit, curl closes the oldest one in the cache to
prevent the number of open connections to increase.
prevent increasing the number of open connections.
If you already have performed transfers with this curl handle, setting a
smaller MAXCONNECTS than before may cause open connections to get closed
unnecessarily.
Note that if you add this easy handle to a multi handle, this setting is not
being acknowledged, but you must instead use \fIcurl_multi_setopt(3)\fP and
acknowledged, and you must instead use \fIcurl_multi_setopt(3)\fP and
the \fICURLMOPT_MAXCONNECTS\fP option.
.IP CURLOPT_CLOSEPOLICY
(Obsolete) This option does nothing.
@@ -1353,10 +1433,10 @@ what it does. Set this to 0 to have libcurl attempt re-using an existing
connection (default behavior).
.IP CURLOPT_FORBID_REUSE
Pass a long. Set to 1 to make the next transfer explicitly close the
connection when done. Normally, libcurl keep all connections alive when done
with one transfer in case there comes a succeeding one that can re-use them.
connection when done. Normally, libcurl keeps all connections alive when done
with one transfer in case a succeeding one follows that can re-use them.
This option should be used with caution and only if you understand what it
does. Set to 0 to have libcurl keep the connection open for possibly later
does. Set to 0 to have libcurl keep the connection open for possible later
re-use (default behavior).
.IP CURLOPT_CONNECTTIMEOUT
Pass a long. It should contain the maximum time in seconds that you allow the
@@ -1381,9 +1461,9 @@ resolve addresses using more than one version of IP. The allowed values are:
.IP CURL_IPRESOLVE_WHATEVER
Default, resolves addresses to all IP versions that your system allows.
.IP CURL_IPRESOLVE_V4
Resolve to ipv4 addresses.
Resolve to IPv4 addresses.
.IP CURL_IPRESOLVE_V6
Resolve to ipv6 addresses.
Resolve to IPv6 addresses.
.RE
.IP CURLOPT_CONNECT_ONLY
Pass a long. If the parameter equals 1, it tells the library to perform all
@@ -1493,14 +1573,14 @@ even indicate an accessible file.
Note that option is by default set to the system path where libcurl's cacert
bundle is assumed to be stored, as established at build time.
When built against NSS this is the directory that the NSS certificate
When built against NSS, this is the directory that the NSS certificate
database resides in.
.IP CURLOPT_ISSUERCERT
Pass a char * to a zero terminated string naming a file holding a CA
certificate in PEM format. If the option is set, an additional check against
the peer certificate is performed to verify the issuer is indeed the one
associated with the certificate provided by the option. This additional check
is useful in multi-level PKI where one need to enforce the peer certificate is
is useful in multi-level PKI where one needs to enforce that the peer certificate is
from a specific branch of the tree.
This option makes sense only when used in combination with the
@@ -1541,7 +1621,7 @@ found in the CRL does not trigger this specific error. (Added in 7.19.0)
.IP CURLOPT_CERTINFO
Pass a long set to 1 to enable libcurl's certificate chain info gatherer. With
this enabled, libcurl (if built with OpenSSL) will extract lots of information
and data about the certificate's in the certificate chain used in the SSL
and data about the certificates in the certificate chain used in the SSL
connection. This data is then possible to extract after a transfer using
\fIcurl_easy_getinfo(3)\fP and its option \fICURLINFO_CERTINFO\fP. (Added in
7.19.1)
@@ -1558,7 +1638,7 @@ Pass a long as parameter.
This option determines whether libcurl verifies that the server cert is for
the server it is known as.
When negotiating an SSL connection, the server sends a certificate indicating
When negotiating a SSL connection, the server sends a certificate indicating
its identity.
When \fICURLOPT_SSL_VERIFYHOST\fP is 2, that certificate must indicate that
@@ -1577,15 +1657,14 @@ certificate.
The default, since 7.10, is 2.
The checking this option controls is of the identity that the server
\fIclaims\fP. The server could be lying. To control lying, see
\fICURLOPT_SSL_VERIFYPEER\fP.
This option controls checking the server's claimed identity. The server could
be lying. To control lying, see \fICURLOPT_SSL_VERIFYPEER\fP.
.IP CURLOPT_SSL_CIPHER_LIST
Pass a char *, pointing to a zero terminated string holding the list of
ciphers to use for the SSL connection. The list must be syntactically correct,
it consists of one or more cipher strings separated by colons. Commas or spaces
are also acceptable separators but colons are normally used, \!, \- and \+ can
be used as operators.
it consists of one or more cipher strings separated by colons. Commas or
spaces are also acceptable separators but colons are normally used, \&!, \&-
and \&+ can be used as operators.
For OpenSSL and GnuTLS valid examples of cipher lists include 'RC4-SHA',
\'SHA1+DES\', 'TLSv1' and 'DEFAULT'. The default list is normally set when you
@@ -1594,7 +1673,7 @@ compile OpenSSL.
You'll find more details about cipher lists on this URL:
\fIhttp://www.openssl.org/docs/apps/ciphers.html\fP
For NSS valid examples of cipher lists include 'rsa_rc4_128_md5',
For NSS, valid examples of cipher lists include 'rsa_rc4_128_md5',
\'rsa_aes_128_sha\', etc. With NSS you don't add/remove ciphers. If one uses
this option then all known ciphers are disabled and only those passed in
are enabled.
@@ -1609,9 +1688,9 @@ cache. Note that while nothing ever should get hurt by attempting to reuse SSL
session-IDs, there seem to be broken SSL implementations in the wild that may
require you to disable this in order for you to succeed. (Added in 7.16.0)
.IP CURLOPT_KRBLEVEL
Pass a char * as parameter. Set the kerberos security level for FTP; this
also enables kerberos awareness. This is a string, 'clear', 'safe',
'confidential' or \&'private'. If the string is set but doesn't match one
Pass a char * as parameter. Set the kerberos security level for FTP; this also
enables kerberos awareness. This is a string, \&'clear', \&'safe',
\&'confidential' or \&'private'. If the string is set but doesn't match one
of these, 'private' will be used. Set the string to NULL to disable kerberos
support for FTP.
@@ -1652,7 +1731,7 @@ share handle. See \fIcurl_share_setopt(3)\fP for details.
If you add a share that is set to share cookies, your easy handle will use
that cookie cache and get the cookie engine enabled. If you unshare an object
that were using cookies (or change to another object that doesn't share
that was using cookies (or change to another object that doesn't share
cookies), the easy handle will get its cookie engine disabled.
Data that the share object is not set to share will be dealt with the usual
@@ -1661,12 +1740,12 @@ way, as if no share was used.
Pass a long as a parameter, containing the value of the permissions that will
be assigned to newly created files on the remote server. The default value is
\fI0644\fP, but any valid value can be used. The only protocols that can use
this are \fIsftp://\fP, \fIscp://\fP and \fIfile://\fP. (Added in 7.16.4)
this are \fIsftp://\fP, \fIscp://\fP, and \fIfile://\fP. (Added in 7.16.4)
.IP CURLOPT_NEW_DIRECTORY_PERMS
Pass a long as a parameter, containing the value of the permissions that will
be assigned to newly created directories on the remote server. The default
value is \fI0755\fP, but any valid value can be used. The only protocols that
can use this are \fIsftp://\fP, \fIscp://\fP and \fIfile://\fP.
can use this are \fIsftp://\fP, \fIscp://\fP, and \fIfile://\fP.
(Added in 7.16.4)
.SH TELNET OPTIONS
.IP CURLOPT_TELNETOPTIONS

View File

@@ -106,8 +106,9 @@ long which gives the length of the buffer.
Tells libcurl to use the \fICURLOPT_READFUNCTION\fP callback to get data. The
parameter you pass to \fICURLFORM_STREAM\fP is the pointer passed on to the
read callback's fourth argument. If you want the part to look like a file
upload one, set the \fICURLFORM_FILENAME\fP parameter as well. (Option added
in libcurl 7.18.2)
upload one, set the \fICURLFORM_FILENAME\fP parameter as well. Note that when
using \fICURLFORM_STREAM\fP, \fICURLFORM_CONTENTSLENGTH\fP must also be set
with the total expected length of the part. (Option added in libcurl 7.18.2)
.IP CURLFORM_ARRAY
Another possibility to send options to curl_formadd() is the
\fBCURLFORM_ARRAY\fP option, that passes a struct curl_forms array pointer as

View File

@@ -13,7 +13,7 @@ curl_formfree - free a previously build multipart/formdata HTTP POST chain
.SH DESCRIPTION
curl_formfree() is used to clean up data previously built/appended with
\fIcurl_formadd(3)\fP. This must be called when the data has been used, which
typically means after the \fIcurl_easy_perform(3)\fP has been called.
typically means after \fIcurl_easy_perform(3)\fP has been called.
.SH RETURN VALUE
None
.SH "SEE ALSO"

View File

@@ -4,7 +4,7 @@
.\"
.TH curl_formget 3 "20 June 2006" "libcurl 7.15.5" "libcurl Manual"
.SH NAME
curl_formget - serialize a previously build multipart/formdata HTTP POST chain
curl_formget - serialize a previously built multipart/formdata HTTP POST chain
.SH SYNOPSIS
.B #include <curl/curl.h>
.sp

View File

@@ -4,7 +4,7 @@
.\"
.TH curl_getdate 3 "12 Aug 2005" "libcurl 7.0" "libcurl Manual"
.SH NAME
curl_getdate - Convert an date string to number of seconds since January 1,
curl_getdate - Convert a date string to number of seconds since January 1,
1970
.SH SYNOPSIS
.B #include <curl/curl.h>
@@ -27,7 +27,7 @@ items:
.TP 0.8i
.B calendar date items
Can be specified several ways. Month names can only be three-letter english
abbrivations, numbers can be zero-prefixed and the year may use 2 or 4 digits.
abbreviations, numbers can be zero-prefixed and the year may use 2 or 4 digits.
Examples: 06 Nov 1994, 06-Nov-94 and Nov-94 6.
.TP
.B time of the day items
@@ -96,5 +96,5 @@ The former version of this function was built with yacc and was not only very
large, it was also never quite understood and it wasn't possible to build with
non-GNU tools since only GNU Bison could make it thread-safe!
The rewrite was done for 7.12.2. The new one is much smaller and use simpler
The rewrite was done for 7.12.2. The new one is much smaller and uses simpler
code.

View File

@@ -24,7 +24,7 @@ to find the specified name, it returns a null pointer.
.SH NOTE
Under unix operating systems, there isn't any point in returning an allocated
memory, although other systems won't work properly if this isn't done. The
unix implementation thus have to suffer slightly from the drawbacks of other
unix implementation thus has to suffer slightly from the drawbacks of other
systems.
.SH "SEE ALSO"
.BR getenv "(3C), "

View File

@@ -23,7 +23,7 @@ effect as one call.
The flags option is a bit pattern that tells libcurl exactly what features to
init, as described below. Set the desired bits by ORing the values together.
In normal operation, you must specify CURL_GLOBAL_ALL. Don't use any other
value unless you are familiar with and mean to control internal operations of
value unless you are familiar with it and mean to control internal operations of
libcurl.
\fBThis function is not thread safe.\fP You must not call it when any other

View File

@@ -28,7 +28,7 @@ curl_mvsprintf - formatted output conversion
.br
.BI "char *curl_mvaprintf(const char *" format ", va_list " args ");"
.SH DESCRIPTION
These are all functions that produces output according to a format string and
These are all functions that produce output according to a format string and
given arguments. These are mostly clones of the well-known C-style functions
and there will be no detailed explanation of all available formatting rules
and usage here.
@@ -83,8 +83,8 @@ future. They will instead be made "available" by source code access only, and
then as curlx_-prefixed functions. See lib/README.curlx for further details.
.SH RETURN VALUE
The \fBcurl_maprintf\fP and \fBcurl_mvaprintf\fP functions return a pointer to
a newly allocated string, or NULL it it failed.
a newly allocated string, or NULL if it failed.
All other functions return the number of character they actually outputed.
All other functions return the number of characters they actually outputted.
.SH "SEE ALSO"
.BR printf "(3), " sprintf "(3), " fprintf "(3), " vprintf "(3) "

View File

@@ -2,7 +2,7 @@
.\"
.TH curl_multi_assign 3 "9 Jul 2006" "libcurl 7.16.0" "libcurl Manual"
.SH NAME
curl_multi_assign \- set data to associated with an internal socket
curl_multi_assign \- set data to association with an internal socket
.SH SYNOPSIS
#include <curl/curl.h>
@@ -34,7 +34,7 @@ In a typical application you allocate a struct or at least use some kind of
semi-dynamic data for each socket that we must wait for action on when using
the \fIcurl_multi_socket(3)\fP approach.
When our socket-callback get called by libcurl and we get to know about yet
When our socket-callback gets called by libcurl and we get to know about yet
another socket to wait for, we can use \fIcurl_multi_assign(3)\fP to point out
the particular data so that when we get updates about this same socket again,
we don't have to find the struct associated with this socket by ourselves.

View File

@@ -17,9 +17,9 @@ CURLMcode curl_multi_fdset(CURLM *multi_handle,
This function extracts file descriptor information from a given multi_handle.
libcurl returns its fd_set sets. The application can use these to select() on,
but be sure to FD_ZERO them before calling this function as
\fIcurl_multi_fdset(3)\fP only adds its own descriptors it doesn't zero or
otherwise remove any other. The \fIcurl_multi_perform(3)\fP function should be
called as soon as one of them are ready to be read from or written to.
\fIcurl_multi_fdset(3)\fP only adds its own descriptors, it doesn't zero or
otherwise remove any others. The \fIcurl_multi_perform(3)\fP function should be
called as soon as one of them is ready to be read from or written to.
If no file descriptors are set by libcurl, \fImax_fd\fP will contain -1 when
this function returns. Otherwise it will contain the higher descriptor number

View File

@@ -29,7 +29,7 @@ is emptied.
calling \fIcurl_multi_cleanup(3)\fP, \fIcurl_multi_remove_handle(3)\fP or
\fIcurl_easy_cleanup(3)\fP.
The 'CURLMsg' struct is very simple and only contain very basic information.
The 'CURLMsg' struct is very simple and only contains very basic information.
If more involved information is wanted, the particular "easy handle" in
present in that struct and can thus be used in subsequent regular
\fIcurl_easy_getinfo(3)\fP calls (or similar):
@@ -48,7 +48,7 @@ When \fBmsg\fP is \fICURLMSG_DONE\fP, the message identifies a transfer that
is done, and then \fBresult\fP contains the return code for the easy handle
that just completed.
At this point, there is no other \fBmsg\fP types defined.
At this point, there are no other \fBmsg\fP types defined.
.SH "RETURN VALUE"
A pointer to a filled-in struct, or NULL if it failed or ran out of
structs. It also writes the number of messages left in the queue (after this

View File

@@ -10,7 +10,7 @@ curl_multi_init - create a multi handle
.ad
.SH DESCRIPTION
This function returns a CURLM handle to be used as input to all the other
multi-functions, sometimes referred to as a multi handle on some places in the
multi-functions, sometimes referred to as a multi handle in some places in the
documentation. This init call MUST have a corresponding call to
\fIcurl_multi_cleanup(3)\fP when the operation is complete.
.SH RETURN VALUE

View File

@@ -32,12 +32,12 @@ actions. You don't have to do it immediately, but the return code means that
libcurl may have more data available to return or that there may be more data
to send off before it is "satisfied". Do note that \fIcurl_multi_perform(3)\fP
will return \fICURLM_CALL_MULTI_PERFORM\fP only when it wants to be called
again \fBimmediately\fP. When things are fine and there are nothing immediate
again \fBimmediately\fP. When things are fine and there is nothing immediate
it wants done, it'll return \fICURLM_OK\fP and you need to wait for \&"action"
and then call this function again.
NOTE that this only returns errors etc regarding the whole multi stack. There
might still have occurred problems on individual transfers even when this
NOTE that this only returns errors etc regarding the whole multi stack. Problems
still might have occurred on individual transfers even when this
function returns \fICURLM_OK\fP.
.SH "TYPICAL USAGE"
Most applications will use \fIcurl_multi_fdset(3)\fP to get the multi_handle's

View File

@@ -21,7 +21,7 @@ You can only set one option in each function call.
.IP CURLMOPT_SOCKETFUNCTION
Pass a pointer to a function matching the \fBcurl_socket_callback\fP
prototype. The \fIcurl_multi_socket(3)\fP functions inform the application
about updates in the socket (file descriptor) status by doing none, one or
about updates in the socket (file descriptor) status by doing none, one, or
multiple calls to the curl_socket_callback given in the \fBparam\fP
argument. They update the status with changes since the previous time a
\fIcurl_multi_socket(3)\fP function was called. If the given callback pointer
@@ -38,7 +38,7 @@ Pass a long set to 1 to enable or 0 to disable. Enabling pipelining on a multi
handle will make it attempt to perform HTTP Pipelining as far as possible for
transfers using this handle. This means that if you add a second request that
can use an already existing connection, the second request will be \&"piped"
on the same connection rather than being executed in parallell. (Added in
on the same connection rather than being executed in parallel. (Added in
7.16.0)
.IP CURLMOPT_TIMERFUNCTION
Pass a pointer to a function matching the \fBcurl_multi_timer_callback\fP
@@ -63,11 +63,11 @@ simultaneously open connections that libcurl may cache. Default is 10, and
libcurl will enlarge the size for each added easy handle to make it fit 4
times the number of added easy handles.
By setting this option, you can prevent the cache size to grow beyond the
By setting this option, you can prevent the cache size from growing beyond the
limit set by you.
When the cache is full, curl closes the oldest one in the cache to prevent the
number of open connections to increase.
number of open connections from increasing.
This option is for the multi handle's use only, when using the easy interface
you should instead use the \fICURLOPT_MAXCONNECTS\fP option.

View File

@@ -44,7 +44,7 @@ is the one that completed. Use \fIcurl_multi_info_read(3)\fP to figure out
which easy handle that completed.
The \fBcurl_multi_socket_action(3)\fP functions inform the application about
updates in the socket (file descriptor) status by doing none, one or multiple
updates in the socket (file descriptor) status by doing none, one, or multiple
calls to the socket callback function set with the CURLMOPT_SOCKETFUNCTION
option to \fIcurl_multi_setopt(3)\fP. They update the status with changes
since the previous time the callback was called.
@@ -64,7 +64,7 @@ equivalent to \fIcurl_multi_socket_action(3)\fP with \fBev_bitmask\fP set to
Force libcurl to (re-)check all its internal sockets and transfers instead of
just a single one by calling \fBcurl_multi_socket_all(3)\fP. Note that there
should not exist any reasons to use this function!
should not be any reason to use this function!
.SH "CALLBACK DETAILS"
The socket \fBcallback\fP function uses a prototype like this
@@ -121,8 +121,8 @@ In modern libcurls, \fICURLM_CALL_MULTI_PERFORM\fP or
\fICURLM_CALL_MULTI_SOKCET\fP should not be returned and no application needs
to care about them.
NOTE that the return code is for the whole multi stack. There might still have
occurred problems on individual transfers even when one of these functions
NOTE that the return code is for the whole multi stack. Problems still might have
occurred on individual transfers even when one of these functions
return OK.
.SH "TYPICAL USAGE"
1. Create a multi handle
@@ -147,7 +147,7 @@ call \fIcurl_multi_socket_action(3)\fP with \fICURL_SOCKET_TIMEOUT\fP
8. Go back to step 6.
.SH AVAILABILITY
This function was added in libcurl 7.15.4, although deemed stable since
This function was added in libcurl 7.15.4, and is deemed stable since
7.16.0.
\fIcurl_multi_socket(3)\fP is deprecated, use

View File

@@ -10,7 +10,7 @@ curl_share_init - Create a shared object
.ad
.SH DESCRIPTION
This function returns a CURLSH handle to be used as input to all the other
share-functions, sometimes referred to as a share handle on some places in the
share-functions, sometimes referred to as a share handle in some places in the
documentation. This init call MUST have a corresponding call to
\fIcurl_share_cleanup\fP when all operations using the share are complete.

View File

@@ -31,7 +31,7 @@ prototype:
void unlock_function(CURL *handle, curl_lock_data data, void *userptr);
\fIdata\fP defines what data libcurl wants to unlock, and you must make sure
that only one lick is given at any time for each kind of data.
that only one lock is given at any time for each kind of data.
\fIuserptr\fP is the pointer you set with \fICURLSHOPT_USERDATA\fP.
.IP CURLSHOPT_SHARE
@@ -51,7 +51,7 @@ This option does the opposite of \fICURLSHOPT_SHARE\fP. It specifies that
the specified \fIparameter\fP will no longer be shared. Valid values are
the same as those for \fICURLSHOPT_SHARE\fP.
.IP CURLSHOPT_USERDATA
The \fIparameter\fP allows you to specify a pointer to data that will passed
The \fIparameter\fP allows you to specify a pointer to data that will be passed
to the lock_function and unlock_function each time it is called.
.SH RETURN VALUE
CURLSHE_OK (zero) means that the option was set properly, non-zero means an

View File

@@ -21,7 +21,7 @@ first \fIlen\fP characters of \fIstr1\fP.
.sp
These functions are provided by libcurl to enable applications to compare
strings in a truly portable manner. There are no standard portable case
insensitive string comparison functions. These two works on all platforms.
insensitive string comparison functions. These two work on all platforms.
.SH AVAILABILITY
These functions will be removed from the public libcurl API in a near
future. They will instead be made "available" by source code access only, and

View File

@@ -34,7 +34,7 @@ Returns a pointer to a filled in struct with information about various
run-time features in libcurl. \fItype\fP should be set to the version of this
functionality by the time you write your program. This way, libcurl will
always return a proper struct that your program understands, while programs in
the future might get an different struct. CURLVERSION_NOW will be the most
the future might get a different struct. CURLVERSION_NOW will be the most
recent one for the library you have installed:
data = curl_version_info(CURLVERSION_NOW);
@@ -74,8 +74,8 @@ typedef struct {
} curl_version_info_data;
.fi
\fIage\fP describes what age of this struct this is. The number depends on how
new libcurl you're using. You are however guaranteed to get a struct that you
\fIage\fP describes what the age of this struct is. The number depends on how
new the libcurl you're using is. You are however guaranteed to get a struct that you
have a matching struct for in the header, as you tell libcurl your "age" with
the input argument.
@@ -126,15 +126,15 @@ allows libcurl to use the current user and the current user's password without
the app having to pass them on. (Added in 7.13.2)
.IP CURL_VERSION_CONV
libcurl was built with support for character conversions, as provided by the
CUURLOPT_CONV_* callbacks. (Added in 7.15.4)
CURLOPT_CONV_* callbacks. (Added in 7.15.4)
.RE
\fIssl_version\fP is an ascii string for the OpenSSL version used. If libcurl
\fIssl_version\fP is an ASCII string for the OpenSSL version used. If libcurl
has no SSL support, this is NULL.
\fIssl_version_num\fP is the numerical OpenSSL version value as defined by the
OpenSSL project. If libcurl has no SSL support, this is 0.
\fIlibz_version\fP is an ascii string (there is no numerical version). If
\fIlibz_version\fP is an ASCII string (there is no numerical version). If
libcurl has no libz support, this is NULL.
\fIprotocols\fP is a pointer to an array of char * pointers, containing the

View File

@@ -26,13 +26,13 @@
libcurl-errors \- error codes in libcurl
.SH DESCRIPTION
This man page includes most, if not all, available error codes in libcurl.
Why they occur and possibly what you can do to fix the problem.
Why they occur and possibly what you can do to fix the problem are also included.
.SH "CURLcode"
Almost all "easy" interface functions return a CURLcode error code. No matter
what, using the \fIcurl_easy_setopt(3)\fP option \fICURLOPT_ERRORBUFFER\fP is
a good idea as it will give you a human readable error string that may offer
more details about the error cause than just the error code
does. \fIcurl_easy_strerror(3)\fP can be called to get an error string from a
more details about the cause of the error than just the error code.
\fIcurl_easy_strerror(3)\fP can be called to get an error string from a
given CURLcode number.
CURLcode is one of the following:
@@ -55,7 +55,7 @@ Couldn't resolve host. The given remote host was not resolved.
.IP "CURLE_COULDNT_CONNECT (7)"
Failed to connect() to host or proxy.
.IP "CURLE_FTP_WEIRD_SERVER_REPLY (8)"
After connecting to an FTP server, libcurl expects to get a certain reply
After connecting to a FTP server, libcurl expects to get a certain reply
back. This error code implies that it got a strange or bad reply. The given
remote server is probably not an OK FTP server.
.IP "CURLE_REMOTE_ACCESS_DENIED (9)"
@@ -73,7 +73,7 @@ fails to parse that line, this return code is passed back.
.IP "CURLE_FTP_CANT_GET_HOST (15)"
An internal failure to lookup the host used for the new connection.
.IP "CURLE_FTP_COULDNT_SET_TYPE (17)"
Received an error when trying to set the transfer mode to binary or ascii.
Received an error when trying to set the transfer mode to binary or ASCII.
.IP "CURLE_PARTIAL_FILE (18)"
A file transfer was shorter or larger than expected. This happens when the
server first reports an expected transfer size, and then delivers data that
@@ -94,19 +94,19 @@ An error occurred when writing received data to a local file, or an error was
returned to libcurl from a write callback.
.IP "CURLE_UPLOAD_FAILED (25)"
Failed starting the upload. For FTP, the server typically denied the STOR
command. The error buffer usually contains the server's explanation to this.
command. The error buffer usually contains the server's explanation for this.
(This error code was formerly known as CURLE_FTP_COULDNT_STOR_FILE.)
.IP "CURLE_READ_ERROR (26)"
There was a problem reading a local file or an error returned by the read
callback.
.IP "CURLE_OUT_OF_MEMORY (27)"
A memory allocation request failed. This is serious badness and
things are severely screwed up if this ever occur.
things are severely screwed up if this ever occurs.
.IP "CURLE_OPERATION_TIMEDOUT (28)"
Operation timeout. The specified time-out period was reached according to the
conditions.
.IP "CURLE_FTP_PORT_FAILED (30)"
The FTP PORT command returned error. This mostly happen when you haven't
The FTP PORT command returned error. This mostly happens when you haven't
specified a good enough address for libcurl to use. See \fICURLOPT_FTPPORT\fP.
.IP "CURLE_FTP_COULDNT_USE_REST (31)"
The FTP REST command returned error. This should never happen if the server is
@@ -162,52 +162,52 @@ Failed sending network data.
.IP "CURLE_RECV_ERROR (56)"
Failure with receiving network data.
.IP "CURLE_SSL_CERTPROBLEM (58)"
problem with the local client certificate
problem with the local client certificate.
.IP "CURLE_SSL_CIPHER (59)"
Couldn't use specified cipher
Couldn't use specified cipher.
.IP "CURLE_SSL_CACERT (60)"
Peer certificate cannot be authenticated with known CA certificates
Peer certificate cannot be authenticated with known CA certificates.
.IP "CURLE_BAD_CONTENT_ENCODING (61)"
Unrecognized transfer encoding
Unrecognized transfer encoding.
.IP "CURLE_LDAP_INVALID_URL (62)"
Invalid LDAP URL
Invalid LDAP URL.
.IP "CURLE_FILESIZE_EXCEEDED (63)"
Maximum file size exceeded
Maximum file size exceeded.
.IP "CURLE_USE_SSL_FAILED (64)"
Requested FTP SSL level failed
Requested FTP SSL level failed.
.IP "CURLE_SEND_FAIL_REWIND (65)"
When doing a send operation curl had to rewind the data to retransmit, but the
rewinding operation failed
rewinding operation failed.
.IP "CURLE_SSL_ENGINE_INITFAILED (66)"
Initiating the SSL Engine failed
Initiating the SSL Engine failed.
.IP "CURLE_LOGIN_DENIED (67)"
The remote server denied curl to login (Added in 7.13.1)
.IP "CURLE_TFTP_NOTFOUND (68)"
File not found on TFTP server
File not found on TFTP server.
.IP "CURLE_TFTP_PERM (69)"
Permission problem on TFTP server
Permission problem on TFTP server.
.IP "CURLE_REMOTE_DISK_FULL (70)"
Out of disk space on the server
Out of disk space on the server.
.IP "CURLE_TFTP_ILLEGAL (71)"
Illegal TFTP operation
Illegal TFTP operation.
.IP "CURLE_TFTP_UNKNOWNID (72)"
Unknown TFTP transfer ID
Unknown TFTP transfer ID.
.IP "CURLE_REMOTE_FILE_EXISTS (73)"
File already exists and will not be overwritten
File already exists and will not be overwritten.
.IP "CURLE_TFTP_NOSUCHUSER (74)"
This error should never be returned by a properly functioning TFTP server
This error should never be returned by a properly functioning TFTP server.
.IP "CURLE_CONV_FAILED (75)"
Character conversion failed
Character conversion failed.
.IP "CURLE_CONV_REQD (76)"
Caller must register conversion callbacks
Caller must register conversion callbacks.
.IP "CURLE_SSL_CACERT_BADFILE (77)"
Problem with reading the SSL CA cert (path? access rights?)
.IP "CURLE_REMOTE_FILE_NOT_FOUND (78)"
The resource referenced in the URL does not exist
The resource referenced in the URL does not exist.
.IP "CURLE_SSH (79)"
An unspecified error occurred during the SSH session
An unspecified error occurred during the SSH session.
.IP "CURLE_SSL_SHUTDOWN_FAILED (80)"
Failed to shut down the SSL connection
Failed to shut down the SSL connection.
.IP "CURLE_AGAIN (81)"
Socket is not ready for send/recv wait till it's ready and try again. This
return code is only returned from \fIcurl_easy_recv(3)\fP and
@@ -217,7 +217,7 @@ Failed to load CRL file (Added in 7.19.0)
.IP "CURLE_SSL_ISSUER_ERROR (83)"
Issuer check failed (Added in 7.19.0)
.IP "CURLE_OBSOLETE*"
These error codes will never be returned. They used to be used in an old libcurl
These error codes will never be returned. They were used in an old libcurl
version and are currently unused.
.SH "CURLMcode"
This is the generic return code used by functions in the libcurl multi

View File

@@ -121,7 +121,7 @@ again (possibly after having altered some options at your own choice).
.SH "MULTI_SOCKET"
Since 7.16.0, the \fIcurl_multi_socket(3)\fP function offers a way for
applications to not only avoid being forced to use select(), but it also
offers a much more high-performing API that will make a significant difference
offers a much more high-performance API that will make a significant difference
for applications using large numbers of simultaneous connections.
\fIcurl_multi_socket(3)\fP (and \fIcurl_multi_socket_all(3)\fP) is then used

View File

@@ -36,7 +36,7 @@ What will be generally referred to as 'the program' will be the collected
source code that you write that is using libcurl for transfers. The program
is outside libcurl and libcurl is outside of the program.
To get the more details on all options and functions described herein, please
To get more details on all options and functions described herein, please
refer to their respective man pages.
.SH "Building"
@@ -72,8 +72,8 @@ if an installed libcurl has been built with SSL support enabled, use
$ curl-config --feature
And if SSL is supported, the keyword 'SSL' will be written to stdout,
possibly together with a few other features that can be on and off on
different libcurls.
possibly together with a few other features that could be either on or off on
for different libcurls.
See also the "Features libcurl Provides" further down.
.IP "autoconf macro"
@@ -87,7 +87,7 @@ The people behind libcurl have put a considerable effort to make libcurl work
on a large amount of different operating systems and environments.
You program libcurl the same way on all platforms that libcurl runs on. There
are only very few minor considerations that differs. If you just make sure to
are only very few minor considerations that differ. If you just make sure to
write your code portable enough, you may very well create yourself a very
portable program. libcurl shouldn't stop you from that.
@@ -113,7 +113,7 @@ should not tell libcurl to do this as well.
.IP CURL_GLOBAL_SSL
which only does anything on libcurls compiled and built SSL-enabled. On these
systems, this will make libcurl initialize the SSL library properly for this
application. This is only needed to do once for each application so if your
application. This only needs to be done once for each application so if your
program or another library already does this, this bit should not be needed.
.RE
@@ -191,8 +191,8 @@ similar to this:
curl_easy_setopt(easyhandle, CURLOPT_WRITEFUNCTION, write_data);
You can control what data your function get in the forth argument by setting
another property:
You can control what data your callback function gets in the fourth argument
by setting another property:
curl_easy_setopt(easyhandle, CURLOPT_WRITEDATA, &internal_struct);
@@ -256,7 +256,7 @@ one thread at a time.
libcurl is completely thread safe, except for two issues: signals and SSL/TLS
handlers. Signals are used for timing out name resolves (during DNS lookup) -
when built without c-ares support and not on Windows..
when built without c-ares support and not on Windows.
If you are accessing HTTPS or FTPS URLs in a multi-threaded manner, you are
then of course using the underlying SSL library multi-threaded and those libs
@@ -274,19 +274,18 @@ GnuTLS
NSS
is claimed to be thread-safe already without anything required
is claimed to be thread-safe already without anything required.
yassl
Required actions unknown
Required actions unknown.
When using multiple threads you should set the CURLOPT_NOSIGNAL option to 1
for all handles. Everything will or might work fine except that timeouts are
not honored during the DNS lookup - which you can work around by building
libcurl with c-ares support. c-ares is a library that provides asynchronous
name resolves. Unfortunately, c-ares does not yet fully support IPv6. On some
platforms, libcurl simply will not function properly multi-threaded unless
this option is set.
name resolves. On some platforms, libcurl simply will not function properly
multi-threaded unless this option is set.
Also, note that CURLOPT_DNS_USE_GLOBAL_CACHE is not thread-safe.
@@ -304,9 +303,9 @@ received output to study is also a clever way to get a better understanding
why the server behaves the way it does. Include headers in the normal body
output with CURLOPT_HEADER set 1.
Of course there are bugs left. We need to get to know about them to be able
Of course, there are bugs left. We need to know about them to be able
to fix them, so we're quite dependent on your bug reports! When you do report
suspected bugs in libcurl, please include as much details you possibly can: a
suspected bugs in libcurl, please include as many details as you possibly can: a
protocol dump that CURLOPT_VERBOSE produces, library version, as much as
possible of your code that uses libcurl, operating system name and version,
compiler name and version etc.
@@ -425,11 +424,11 @@ To pass the known private key password to libcurl:
The previous chapter showed how to set user name and password for getting
URLs that require authentication. When using the HTTP protocol, there are
many different ways a client can provide those credentials to the server and
you can control what way libcurl will (attempt to) use. The default HTTP
you can control which way libcurl will (attempt to) use them. The default HTTP
authentication method is called 'Basic', which is sending the name and
password in clear-text in the HTTP request, base64-encoded. This is insecure.
At the time of this writing libcurl can be built to use: Basic, Digest, NTLM,
At the time of this writing, libcurl can be built to use: Basic, Digest, NTLM,
Negotiate, GSS-Negotiate and SPNEGO. You can tell libcurl which one to use
with CURLOPT_HTTPAUTH as in:
@@ -476,7 +475,7 @@ CURLOPT_POSTFIELDS, this automatically switches the handle to use POST in the
upcoming request.
Ok, so what if you want to post binary data that also requires you to set the
Content-Type: header of the post? Well, binary posts prevents libcurl from
Content-Type: header of the post? Well, binary posts prevent libcurl from
being able to do strlen() on the data to figure out the size, so therefore we
must tell libcurl the size of the post data. Setting headers in libcurl
requests are done in a generic way, by building a list of our own headers and
@@ -503,7 +502,7 @@ then passing that list to libcurl.
While the simple examples above cover the majority of all cases where HTTP
POST operations are required, they don't do multi-part formposts. Multi-part
formposts were introduced as a better way to post (possibly large) binary data
and was first documented in the RFC1867. They're called multi-part because
and were first documented in the RFC1867. They're called multi-part because
they're built by a chain of parts, each being a single unit. Each part has its
own name and contents. You can in fact create and post a multi-part formpost
with the regular libcurl POST support described above, but that would require
@@ -512,7 +511,7 @@ easier, libcurl provides \fIcurl_formadd(3)\fP. Using this function, you add
parts to the form. When you're done adding parts, you post the whole form.
The following example sets two simple text parts with plain textual contents,
and then a file with binary contents and upload the whole thing.
and then a file with binary contents and uploads the whole thing.
.nf
struct curl_httppost *post=NULL;
@@ -541,7 +540,7 @@ headers. It means that each one of these separate parts get a few headers set
that describe the individual content-type, size etc. To enable your
application to handicraft this formpost even more, libcurl allows you to
supply your own set of custom headers to such an individual form part. You can
of course supply headers to as many parts you like, but this little example
of course supply headers to as many parts as you like, but this little example
will show how you set headers to one specific part when you add that to the
post handle:
@@ -563,8 +562,8 @@ post handle:
Since all options on an easyhandle are "sticky", they remain the same until
changed even if you do call \fIcurl_easy_perform(3)\fP, you may need to tell
curl to go back to a plain GET request if you intend to do such a one as your
next request. You force an easyhandle to back to GET by using the
curl to go back to a plain GET request if you intend to do one as your
next request. You force an easyhandle to go back to GET by using the
CURLOPT_HTTPGET option:
curl_easy_setopt(easyhandle, CURLOPT_HTTPGET, 1L);
@@ -575,10 +574,10 @@ doing a POST. It will just make it POST without any data to send!
.SH "Showing Progress"
For historical and traditional reasons, libcurl has a built-in progress meter
that can be switched on and then makes it presents a progress meter in your
that can be switched on and then makes it present a progress meter in your
terminal.
Switch on the progress meter by, oddly enough, set CURLOPT_NOPROGRESS to
Switch on the progress meter by, oddly enough, setting CURLOPT_NOPROGRESS to
zero. This option is set to 1 by default.
For most applications however, the built-in progress meter is useless and
@@ -643,7 +642,7 @@ restrictions on what can actually happen. A requested URL that might not be a
HTTP URL will be still be passed to the HTTP proxy to deliver back to
libcurl. This happens transparently, and an application may not need to
know. I say "may", because at times it is very important to understand that
all operations over a HTTP proxy is using the HTTP protocol. For example, you
all operations over a HTTP proxy use the HTTP protocol. For example, you
can't invoke your own custom FTP commands or even proper FTP directory
listings.
@@ -774,7 +773,7 @@ Even if the connection is dropped, all connections involving SSL to the same
host again, will benefit from libcurl's session ID cache that drastically
reduces re-connection time.
FTP connections that are kept alive saves a lot of time, as the command-
FTP connections that are kept alive save a lot of time, as the command-
response round-trips are skipped, and also you don't risk getting blocked
without permission to login again like on many FTP servers only allowing N
persons to be logged in at the same time.
@@ -787,7 +786,7 @@ may also be added in the future.
Each easy handle will attempt to keep the last few connections alive for a
while in case they are to be used again. You can set the size of this "cache"
with the CURLOPT_MAXCONNECTS option. Default is 5. It is very seldom any
with the CURLOPT_MAXCONNECTS option. Default is 5. There is very seldom any
point in changing this value, and if you think of changing this it is often
just a matter of thinking again.
@@ -800,7 +799,7 @@ CURLOPT_FORBID_REUSE to 1.
.SH "HTTP Headers Used by libcurl"
When you use libcurl to do HTTP requests, it'll pass along a series of headers
automatically. It might be good for you to know and understand these ones. You
automatically. It might be good for you to know and understand these. You
can replace or remove them by using the CURLOPT_HTTPHEADER option.
.IP "Host"
@@ -824,7 +823,7 @@ this header.
.SH "Customizing Operations"
There is an ongoing development today where more and more protocols are built
upon HTTP for transport. This has obvious benefits as HTTP is a tested and
reliable protocol that is widely deployed and have excellent proxy-support.
reliable protocol that is widely deployed and has excellent proxy-support.
When you use one of these protocols, and even when doing other kinds of
programming you may need to change the traditional HTTP (or FTP or...)
@@ -840,14 +839,14 @@ for you. It is very simple to use:
curl_easy_setopt(easyhandle, CURLOPT_CUSTOMREQUEST, "MYOWNRUQUEST");
When using the custom request, you change the request keyword of the actual
request you are performing. Thus, by default you make GET request but you can
request you are performing. Thus, by default you make a GET request but you can
also make a POST operation (as described before) and then replace the POST
keyword if you want to. You're the boss.
.IP "Modify Headers"
HTTP-like protocols pass a series of headers to the server when doing the
request, and you're free to pass any amount of extra headers that you
think fit. Adding headers are this easy:
think fit. Adding headers is this easy:
.nf
struct curl_slist *headers=NULL; /* init to NULL is important */
@@ -874,8 +873,8 @@ replace them by simply setting them too:
.IP "Delete Headers"
If you replace an existing header with one with no contents, you will prevent
the header from being sent. Like if you want to completely prevent the
\&"Accept:" header to be sent, you can disable it with code similar to this:
the header from being sent. For instance, if you want to completely prevent the
\&"Accept:" header from being sent, you can disable it with code similar to this:
headers = curl_slist_append(headers, "Accept:");
@@ -894,7 +893,7 @@ data size is unknown.
.IP "HTTP Version"
All HTTP requests includes the version number to tell the server which version
we support. libcurl speak HTTP 1.1 by default. Some very old servers don't
we support. libcurl speaks HTTP 1.1 by default. Some very old servers don't
like getting 1.1-requests and when dealing with stubborn old things like that,
you can tell libcurl to use 1.0 instead by doing something like this:
@@ -903,12 +902,12 @@ you can tell libcurl to use 1.0 instead by doing something like this:
.IP "FTP Custom Commands"
Not all protocols are HTTP-like, and thus the above may not help you when
you want to make for example your FTP transfers to behave differently.
you want to make, for example, your FTP transfers to behave differently.
Sending custom commands to a FTP server means that you need to send the
commands exactly as the FTP server expects them (RFC959 is a good guide
here), and you can only use commands that work on the control-connection
alone. All kinds of commands that requires data interchange and thus needs
alone. All kinds of commands that require data interchange and thus need
a data-connection must be left to libcurl's own judgment. Also be aware
that libcurl will do its very best to change directory to the target
directory before doing any transfer, so if you change directory (with CWD
@@ -948,7 +947,7 @@ combine with CURLOPT_NOBODY. If this option is set, no actual file content
transfer will be performed.
.IP "FTP Custom CUSTOMREQUEST"
If you do what list the contents of a FTP directory using your own defined FTP
If you do want to list the contents of a FTP directory using your own defined FTP
command, CURLOPT_CUSTOMREQUEST will do just that. "NLST" is the default one
for listing directories but you're free to pass in your idea of a good
alternative.
@@ -960,7 +959,7 @@ subsequent request to the server that matches the particular conditions
set. The conditions include that the domain name and path match and that the
cookie hasn't become too old.
In real-world cases, servers send new cookies to replace existing one to
In real-world cases, servers send new cookies to replace existing ones to
update them. Server use cookies to "track" users and to keep "sessions".
Cookies are sent from server to clients with the header Set-Cookie: and
@@ -973,11 +972,11 @@ to set a cookie string like this:
In many cases, that is not enough. You might want to dynamically save
whatever cookies the remote server passes to you, and make sure those cookies
are then use accordingly on later requests.
are then used accordingly on later requests.
One way to do this, is to save all headers you receive in a plain file and
when you make a request, you tell libcurl to read the previous headers to
figure out which cookies to use. Set header file to read cookies from with
figure out which cookies to use. Set the header file to read cookies from with
CURLOPT_COOKIEFILE.
The CURLOPT_COOKIEFILE option also automatically enables the cookie parser in
@@ -986,20 +985,20 @@ understand incoming cookies and they will just be ignored. However, when the
parser is enabled the cookies will be understood and the cookies will be kept
in memory and used properly in subsequent requests when the same handle is
used. Many times this is enough, and you may not have to save the cookies to
disk at all. Note that the file you specify to CURLOPT_COOKIEFILE doesn't
have to exist to enable the parser, so a common way to just enable the parser
and not read able might be to use a file name you know doesn't exist.
disk at all. Note that the file you specify to CURLOPT_COOKIEFILE doesn't have
to exist to enable the parser, so a common way to just enable the parser and
not read any cookies is to use the name of a file you know doesn't exist.
If you rather use existing cookies that you've previously received with your
Netscape or Mozilla browsers, you can make libcurl use that cookie file as
input. The CURLOPT_COOKIEFILE is used for that too, as libcurl will
If you would rather use existing cookies that you've previously received with
your Netscape or Mozilla browsers, you can make libcurl use that cookie file
as input. The CURLOPT_COOKIEFILE is used for that too, as libcurl will
automatically find out what kind of file it is and act accordingly.
The perhaps most advanced cookie operation libcurl offers, is saving the
Perhaps the most advanced cookie operation libcurl offers, is saving the
entire internal cookie state back into a Netscape/Mozilla formatted cookie
file. We call that the cookie-jar. When you set a file name with
CURLOPT_COOKIEJAR, that file name will be created and all received cookies
will be stored in it when \fIcurl_easy_cleanup(3)\fP is called. This enabled
will be stored in it when \fIcurl_easy_cleanup(3)\fP is called. This enables
cookies to get passed on properly between multiple handles without any
information getting lost.
@@ -1007,7 +1006,7 @@ information getting lost.
FTP transfers use a second TCP/IP connection for the data transfer. This is
usually a fact you can forget and ignore but at times this fact will come
back to haunt you. libcurl offers several different ways to custom how the
back to haunt you. libcurl offers several different ways to customize how the
second connection is being made.
libcurl can either connect to the server a second time or tell the server to
@@ -1094,19 +1093,17 @@ Many of the protocols libcurl supports send name and password unencrypted as
clear text (HTTP Basic authentication, FTP, TELNET etc). It is very easy for
anyone on your network or a network nearby yours, to just fire up a network
analyzer tool and eavesdrop on your passwords. Don't let the fact that HTTP
uses base64 encoded passwords fool you. They may not look readable at a first
glance, but they very easily "deciphered" by anyone within seconds.
To avoid this problem, use protocols that don't let snoopers see your
password: HTTPS, FTPS and FTP-kerberos are a few examples. HTTP Digest
authentication allows this too, but isn't supported by libcurl as of this
writing.
Basic uses base64 encoded passwords fool you. They may not look readable at a
first glance, but they very easily "deciphered" by anyone within seconds.
To avoid this problem, use HTTP athentication methods or other protocols that
don't let snoopers see your password: HTTP with Digest, NTLM or GSS
authentication, HTTPS, FTPS, SCP, SFTP and FTP-kerberos are a few examples.
.IP "Showing What You Do"
On a related issue, be aware that even in situations like when you have
problems with libcurl and ask someone for help, everything you reveal in order
to get best possible help might also impose certain security related
risks. Host names, user names, paths, operating system specifics etc (not to
risks. Host names, user names, paths, operating system specifics, etc (not to
mention passwords of course) may in fact be used by intruders to gain
additional information of a potential target.
@@ -1117,10 +1114,10 @@ information with faked data.
.SH "Multiple Transfers Using the multi Interface"
The easy interface as described in detail in this document is a synchronous
interface that transfers one file at a time and doesn't return until its
interface that transfers one file at a time and doesn't return until it is
done.
The multi interface on the other hand, allows your program to transfer
The multi interface, on the other hand, allows your program to transfer
multiple files in both directions at the same time, without forcing you
to use multiple threads. The name might make it seem that the multi
interface is for multi-threaded programs, but the truth is almost the
@@ -1141,7 +1138,7 @@ have been told above, and then you create a multi handle with
with \fIcurl_multi_add_handle(3)\fP.
When you've added the handles you have for the moment (you can still add new
ones at any time), you start the transfers by call
ones at any time), you start the transfers by calling
\fIcurl_multi_perform(3)\fP.
\fIcurl_multi_perform(3)\fP is asynchronous. It will only execute as little as
@@ -1160,7 +1157,7 @@ with the particular file descriptors libcurl uses for the moment.
When you then call select(), it'll return when one of the file handles signal
action and you then call \fIcurl_multi_perform(3)\fP to allow libcurl to do
what it wants to do. Take note that libcurl does also feature some time-out
code so we advice you to never use very long timeouts on select() before you
code so we advise you to never use very long timeouts on select() before you
call \fIcurl_multi_perform(3)\fP, which thus should be called unconditionally
every now and then even if none of its file descriptors have signaled
ready. Another precaution you should use: always call
@@ -1191,7 +1188,7 @@ to figure out success on each individual transfer.
.IP "[1]"
libcurl 7.10.3 and later have the ability to switch over to chunked
Transfer-Encoding in cases were HTTP uploads are done with data of an unknown
Transfer-Encoding in cases where HTTP uploads are done with data of an unknown
size.
.IP "[2]"
This happens on Windows machines when libcurl is built and used as a

View File

@@ -4,7 +4,7 @@
.SH NAME
libcurl \- client-side URL transfers
.SH DESCRIPTION
This is an short overview on how to use libcurl in your C programs. There are
This is a short overview on how to use libcurl in your C programs. There are
specific man pages for each function mentioned in here. There are also the
\fIlibcurl-easy(3)\fP man page, the \fIlibcurl-multi(3)\fP man page, the
\fIlibcurl-share(3)\fP man page and the \fIlibcurl-tutorial(3)\fP man page for
@@ -25,14 +25,14 @@ the option of using the "easy" interface, or the "multi" interface.
The easy interface is a synchronous interface with which you call
\fIcurl_easy_perform(3)\fP and let it perform the transfer. When it is
completed, the function return and you can continue. More details are found in
completed, the function returns and you can continue. More details are found in
the \fIlibcurl-easy(3)\fP man page.
The multi interface on the other hand is an asynchronous interface, that you
call and that performs only a little piece of the transfer on each invoke. It
is perfect if you want to do things while the transfer is in progress, or
similar. The multi interface allows you to select() on libcurl action, and
even to easily download multiple files simultaneously using a single thread. See further deails in the \fIlibcurl-multi(3)\fP man page.
even to easily download multiple files simultaneously using a single thread. See further details in the \fIlibcurl-multi(3)\fP man page.
You can have multiple easy handles share certain data, even if they are used
in different threads. This magic is setup using the share interface, as
@@ -106,7 +106,7 @@ do as many of your file transfers as possible using the same curl handle. When
you call \fIcurl_easy_cleanup(3)\fP, all the possibly open connections held by
libcurl will be closed and forgotten.
Note that the options set with \fIcurl_easy_setopt(3)\fP will be used in on
Note that the options set with \fIcurl_easy_setopt(3)\fP will be used on
every repeated \fIcurl_easy_perform(3)\fP call.
.SH "GLOBAL CONSTANTS"
@@ -161,7 +161,7 @@ and has a place to call the libcurl functions. Note that if multiple
modules in the program use libcurl, they all will separately call the
libcurl functions, and that's OK because only the first
\fIcurl_global_init()\fP and the last \fIcurl_global_cleanup()\fP in a
program changes anything. (libcurl uses a reference count in static
program change anything. (libcurl uses a reference count in static
memory).
In a C++ module, it is common to deal with the global constant

View File

@@ -0,0 +1,314 @@
_ _ ____ _
___| | | | _ \| |
/ __| | | | |_) | |
| (__| |_| | _ <| |___
\___|\___/|_| \_\_____|
This document lists defines and other symbols present in libcurl, together
with exact information about the first libcurl version that provides the
symbol, the first version in which the symbol was marked as deprecated and
for a few symbols the last version that featured it. The names appear in
alphabetical order.
Name Introduced Deprecated Removed
CURLAUTH_ANY 7.10.6
CURLAUTH_ANYSAFE 7.10.6
CURLAUTH_BASIC 7.10.6
CURLAUTH_DIGEST 7.10.6
CURLAUTH_DIGEST_IE 7.19.3
CURLAUTH_GSSNEGOTIATE 7.10.6
CURLAUTH_NTLM 7.10.6
CURLFTPAUTH_DEFAULT 7.12.2
CURLFTPAUTH_DEFAULT 7.12.2
CURLFTPAUTH_SSL 7.12.2
CURLFTPAUTH_SSL 7.12.2
CURLFTPAUTH_TLS 7.12.2
CURLFTPAUTH_TLS 7.12.2
CURLFTPMETHOD_MULTICWD 7.15.1
CURLFTPMETHOD_NOCWD 7.15.1
CURLFTPMETHOD_SINGLECWD 7.15.1
CURLFTPSSL_CCC_ACTIVE 7.16.1
CURLFTPSSL_CCC_NONE 7.16.1
CURLFTPSSL_CCC_PASSIVE 7.16.1
CURLFTP_CREATE_DIR 7.19.4
CURLFTP_CREATE_DIR_NONE 7.19.4
CURLFTP_CREATE_DIR_RETRY 7.19.4
CURLINFO_APPCONNECT_TIME 7.19.0
CURLINFO_CERTINFO 7.19.1
CURLINFO_CONDITION_UNMET 7.19.4
CURLINFO_CONNECT_TIME 7.4.1
CURLINFO_CONTENT_LENGTH_DOWNLOAD 7.6.1
CURLINFO_CONTENT_LENGTH_UPLOAD 7.6.1
CURLINFO_CONTENT_TYPE 7.9.4
CURLINFO_COOKIELIST 7.14.1
CURLINFO_DATA_IN 7.9.6
CURLINFO_DATA_OUT 7.9.6
CURLINFO_FILETIME 7.5
CURLINFO_FTP_ENTRY_PATH 7.15.4
CURLINFO_HEADER_IN 7.9.6
CURLINFO_HEADER_OUT 7.9.6
CURLINFO_HEADER_SIZE 7.4.1
CURLINFO_HTTPAUTH_AVAIL 7.10.8
CURLINFO_HTTP_CODE 7.4.1 7.10.8
CURLINFO_HTTP_CONNECTCODE 7.10.7
CURLINFO_LASTSOCKET 7.15.2
CURLINFO_NAMELOOKUP_TIME 7.4.1
CURLINFO_NUM_CONNECTS 7.12.3
CURLINFO_OS_ERRNO 7.12.2
CURLINFO_PRETRANSFER_TIME 7.4.1
CURLINFO_PRIMARY_IP 7.19.0
CURLINFO_PRIVATE 7.10.3
CURLINFO_PRIVATE 7.10.3
CURLINFO_PROXYAUTH_AVAIL 7.10.8
CURLINFO_REDIRECT_COUNT 7.9.7
CURLINFO_REDIRECT_TIME 7.9.7
CURLINFO_REDIRECT_URL 7.18.2
CURLINFO_REQUEST_SIZE 7.4.1
CURLINFO_RESPONSE_CODE 7.10.8
CURLINFO_SIZE_DOWNLOAD 7.4.1
CURLINFO_SIZE_UPLOAD 7.4.1
CURLINFO_SPEED_DOWNLOAD 7.4.1
CURLINFO_SPEED_UPLOAD 7.4.1
CURLINFO_SSL_ENGINES 7.12.3
CURLINFO_SSL_VERIFYRESULT 7.5
CURLINFO_STARTTRANSFER_TIME 7.9.2
CURLINFO_TEXT 7.9.6
CURLINFO_TOTAL_TIME 7.4.1
CURLOPT_ADDRESS_SCOPE 7.19.0
CURLOPT_APPEND 7.16.4
CURLOPT_AUTOREFERER 7.1
CURLOPT_BUFFERSIZE 7.10
CURLOPT_CAINFO 7.4.2
CURLOPT_CAPATH 7.9.8
CURLOPT_CERTINFO 7.19.1
CURLOPT_CLOSEFUNCTION 7.7 7.11.1 7.15.4
CURLOPT_CLOSEPOLICY 7.7 7.16.1
CURLOPT_CONNECTTIMEOUT 7.7
CURLOPT_CONNECTTIMEOUT_MS 7.16.2
CURLOPT_CONNECT_ONLY 7.15.2
CURLOPT_CONV_FROM_NETWORK_FUNCTION 7.15.4
CURLOPT_CONV_FROM_UTF8_FUNCTION 7.15.4
CURLOPT_CONV_TO_NETWORK_FUNCTION 7.15.4
CURLOPT_COOKIE 7.1
CURLOPT_COOKIEFILE 7.1
CURLOPT_COOKIEJAR 7.9
CURLOPT_COOKIELIST 7.17.1
CURLOPT_COOKIESESSION 7.9.7
CURLOPT_COPYPOSTFIELDS 7.17.1
CURLOPT_CRLF 7.1
CURLOPT_CRLFILE 7.19.0
CURLOPT_CUSTOMREQUEST 7.1
CURLOPT_DEBUGDATA 7.9.6
CURLOPT_DEBUGFUNCTION 7.9.6
CURLOPT_DIRLISTONLY 7.16.4
CURLOPT_DNS_CACHE_TIMEOUT 7.9.3
CURLOPT_DNS_USE_GLOBAL_CACHE 7.9.3 7.11.1
CURLOPT_EGDSOCKET 7.7
CURLOPT_ENCODING 7.12.2
CURLOPT_ERRORBUFFER 7.1
CURLOPT_FAILONERROR 7.1
CURLOPT_FILE 7.1 7.9.7
CURLOPT_FILETIME 7.5
CURLOPT_FLAGS 7.1 - 7.9.2
CURLOPT_FOLLOWLOCATION 7.1
CURLOPT_FORBID_REUSE 7.7
CURLOPT_FRESH_CONNECT 7.7
CURLOPT_FTPAPPEND 7.1 7.16.4
CURLOPT_FTPASCII 7.1 7.11.1 7.15.4
CURLOPT_FTPLISTONLY 7.1 7.16.4
CURLOPT_FTPPORT 7.1
CURLOPT_FTPSSLAUTH 7.12.2
CURLOPT_FTP_ACCOUNT 7.13.1
CURLOPT_FTP_ALTERNATIVE_TO_USER 7.15.5
CURLOPT_FTP_CREATE_MISSING_DIRS 7.10.7
CURLOPT_FTP_FILEMETHOD 7.15.1
CURLOPT_FTP_RESPONSE_TIMEOUT 7.10.8
CURLOPT_FTP_SKIP_PASV_IP 7.15.0
CURLOPT_FTP_SSL 7.11.0 7.16.4
CURLOPT_FTP_SSL_CCC 7.16.1
CURLOPT_FTP_USE_EPRT 7.10.5
CURLOPT_FTP_USE_EPSV 7.9.2
CURLOPT_HEADER 7.1
CURLOPT_HEADERFUNCTION 7.7.2
CURLOPT_HTTP200ALIASES 7.10.3
CURLOPT_HTTPAUTH 7.10.6
CURLOPT_HTTPGET 7.8.1
CURLOPT_HTTPHEADER 7.1
CURLOPT_HTTPPOST 7.1
CURLOPT_HTTPPROXYTUNNEL 7.3
CURLOPT_HTTPREQUEST 7.1 - 7.15.4
CURLOPT_HTTP_CONTENT_DECODING 7.16.2
CURLOPT_HTTP_TRANSFER_DECODING 7.16.2
CURLOPT_HTTP_VERSION 7.9.1
CURLOPT_IGNORE_CONTENT_LENGTH 7.14.1
CURLOPT_INFILE 7.1 7.9.7
CURLOPT_INFILESIZE 7.1
CURLOPT_INFILESIZE_LARGE 7.11.0
CURLOPT_INTERFACE 7.3
CURLOPT_IOCTLDATA 7.12.3
CURLOPT_IOCTLFUNCTION 7.12.3
CURLOPT_IPRESOLVE 7.10.8
CURLOPT_ISSUERCERT 7.19.0
CURLOPT_KEYPASSWD 7.17.0
CURLOPT_KRB4LEVEL 7.3
CURLOPT_KRBLEVEL 7.16.4
CURLOPT_LOCALPORT 7.15.2
CURLOPT_LOCALPORTRANGE 7.15.2
CURLOPT_LOW_SPEED_LIMIT 7.1
CURLOPT_LOW_SPEED_TIME 7.1
CURLOPT_MAXCONNECTS 7.7
CURLOPT_MAXFILESIZE 7.10.8
CURLOPT_MAXFILESIZE_LARGE 7.11.0
CURLOPT_MAXREDIRS 7.5
CURLOPT_MAX_RECV_SPEED_LARGE 7.15.5
CURLOPT_MAX_SEND_SPEED_LARGE 7.15.5
CURLOPT_MUTE 7.1 7.8 7.15.4
CURLOPT_NETRC 7.1
CURLOPT_NETRC_FILE 7.11.0
CURLOPT_NEW_DIRECTORY_PERMS 7.16.4
CURLOPT_NEW_FILE_PERMS 7.16.4
CURLOPT_NOBODY 7.1
CURLOPT_NOPROGRESS 7.1
CURLOPT_NOPROXY 7.19.4
CURLOPT_NOSIGNAL 7.10
CURLOPT_OPENSOCKETDATA 7.17.1
CURLOPT_OPENSOCKETFUNCTION 7.17.1
CURLOPT_PASSWDDATA 7.1 7.11.1 7.15.4
CURLOPT_PASSWDFUNCTION 7.1 7.11.1 7.15.4
CURLOPT_PASSWORD 7.19.1
CURLOPT_PASV_POST 7.12.1 - 7.13.0
CURLOPT_PORT 7.1
CURLOPT_POST 7.1
CURLOPT_POST301 7.17.1 7.19.1
CURLOPT_POSTFIELDS 7.1
CURLOPT_POSTFIELDSIZE 7.2
CURLOPT_POSTFIELDSIZE_LARGE 7.11.1
CURLOPT_POSTQUOTE 7.1
CURLOPT_POSTREDIR 7.19.1
CURLOPT_PREQUOTE 7.9.5
CURLOPT_PRIVATE 7.10.3
CURLOPT_PROGRESSDATA 7.1
CURLOPT_PROGRESSFUNCTION 7.1
CURLOPT_PROGRESSMODE 7.1 - 7.9.2
CURLOPT_PROTOCOLS 7.19.4
CURLOPT_PROXY 7.1
CURLOPT_PROXYAUTH 7.10.7
CURLOPT_PROXYPASSWORD 7.19.1
CURLOPT_PROXYPORT 7.1
CURLOPT_PROXYTYPE 7.10
CURLOPT_PROXYUSERNAME 7.19.1
CURLOPT_PROXYUSERPWD 7.1
CURLOPT_PROXY_TRANSFER_MODE 7.18.0
CURLOPT_PUT 7.1
CURLOPT_QUOTE 7.1
CURLOPT_RANDOM_FILE 7.7
CURLOPT_RANGE 7.1
CURLOPT_READDATA 7.9.7
CURLOPT_READFUNCTION 7.1
CURLOPT_REDIR_PROTOCOLS 7.19.4
CURLOPT_REFERER 7.1
CURLOPT_RESUME_FROM 7.1
CURLOPT_RESUME_FROM_LARGE 7.11.0
CURLOPT_SEEKDATA 7.18.1
CURLOPT_SEEKFUNCTION 7.18.1
CURLOPT_SHARE 7.10
CURLOPT_SOCKOPTDATA 7.16.0
CURLOPT_SOCKOPTFUNCTION 7.16.0
CURLOPT_SOCKS5_GSSAPI_NEC 7.19.4
CURLOPT_SOCKS5_GSSAPI_SERVICE 7.19.4
CURLOPT_SOURCE_HOST 7.12.1 - 7.13.0
CURLOPT_SOURCE_PATH 7.12.1 - 7.13.0
CURLOPT_SOURCE_PORT 7.12.1 - 7.13.0
CURLOPT_SOURCE_POSTQUOTE 7.12.1 - 7.15.4
CURLOPT_SOURCE_PREQUOTE 7.12.1 - 7.15.4
CURLOPT_SOURCE_QUOTE 7.13.0 - 7.15.4
CURLOPT_SOURCE_URL 7.13.0 - 7.15.4
CURLOPT_SOURCE_USERPWD 7.12.1 - 7.15.4
CURLOPT_SSH_AUTH_TYPES 7.16.1
CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 7.17.1
CURLOPT_SSH_PRIVATE_KEYFILE 7.16.1
CURLOPT_SSH_PUBLIC_KEYFILE 7.16.1
CURLOPT_SSLCERT 7.1
CURLOPT_SSLCERTTYPE 7.9.3
CURLOPT_SSLENGINE 7.9.3
CURLOPT_SSLENGINE_DEFAULT 7.9.3
CURLOPT_SSLKEY 7.9.3
CURLOPT_SSLKEYPASSWD 7.17.0
CURLOPT_SSLKEYTYPE 7.9.3
CURLOPT_SSLVERSION 7.1
CURLOPT_SSL_CIPHER_LIST 7.9
CURLOPT_SSL_CTX_DATA 7.10.6
CURLOPT_SSL_CTX_FUNCTION 7.10.6
CURLOPT_SSL_SESSIONID_CACHE 7.16.0
CURLOPT_SSL_VERIFYHOST 7.8.1
CURLOPT_SSL_VERIFYPEER 7.4.2
CURLOPT_STDERR 7.1
CURLOPT_TCP_NODELAY 7.11.2
CURLOPT_TELNETOPTIONS 7.7
CURLOPT_TFTPBLKSIZE 7.19.4
CURLOPT_TIMECONDITION 7.1
CURLOPT_TIMEOUT 7.1
CURLOPT_TIMEOUT_MS 7.16.2
CURLOPT_TIMEVALUE 7.1
CURLOPT_TRANSFERTEXT 7.11.1
CURLOPT_UNRESTRICTED_AUTH 7.10.4
CURLOPT_UPLOAD 7.1
CURLOPT_URL 7.1
CURLOPT_USERAGENT 7.1
CURLOPT_USERNAME 7.19.1
CURLOPT_USERPWD 7.1
CURLOPT_USE_SSL 7.17.0
CURLOPT_VERBOSE 7.1
CURLOPT_WRITEDATA 7.9.7
CURLOPT_WRITEFUNCTION 7.1
CURLOPT_WRITEHEADER 7.1
CURLPROTO_ALL 7.19.4
CURLPROTO_DICT 7.19.4
CURLPROTO_FILE 7.19.4
CURLPROTO_FTP 7.19.4
CURLPROTO_FTPS 7.19.4
CURLPROTO_HTTP 7.19.4
CURLPROTO_HTTPS 7.19.4
CURLPROTO_LDAP 7.19.4
CURLPROTO_LDAPS 7.19.4
CURLPROTO_SCP 7.19.4
CURLPROTO_SFTP 7.19.4
CURLPROTO_TELNET 7.19.4
CURLPROTO_TFTP 7.19.4
CURLPROXY_HTTP 7.10
CURLPROXY_HTTP_1_0 7.19.4
CURLPROXY_SOCKS4 7.10
CURLPROXY_SOCKS4A 7.18.0
CURLPROXY_SOCKS5 7.10
CURLPROXY_SOCKS5_HOSTNAME 7.18.0
CURLUSESSL_ALL 7.17.0
CURLUSESSL_CONTROL 7.17.0
CURLUSESSL_NONE 7.17.0
CURLUSESSL_TRY 7.17.0
CURL_HTTP_VERSION_1_0 7.9.1
CURL_HTTP_VERSION_1_1 7.9.1
CURL_HTTP_VERSION_NONE 7.9.1
CURL_IPRESOLVE_V4 7.10.8
CURL_IPRESOLVE_V6 7.10.8
CURL_IPRESOLVE_WHATEVER 7.10.8
CURL_NETRC_IGNORED 7.9.8
CURL_NETRC_OPTIONAL 7.9.8
CURL_NETRC_REQUIRED 7.9.8
CURL_SSLVERSION_DEFAULT 7.9.2
CURL_SSLVERSION_SSLv2 7.9.2
CURL_SSLVERSION_SSLv3 7.9.2
CURL_SSLVERSION_TLSv1 7.9.2
CURL_VERSION_ASYNCHDNS 7.10.7
CURL_VERSION_CONV 7.15.4
CURL_VERSION_DEBUG 7.10.6
CURL_VERSION_GSSNEGOTIATE 7.10.6
CURL_VERSION_IDN 7.12.0
CURL_VERSION_IPV6 7.10
CURL_VERSION_KERBEROS4 7.10
CURL_VERSION_LARGEFILE 7.11.1
CURL_VERSION_LIBZ 7.10
CURL_VERSION_NTLM 7.10.6
CURL_VERSION_SPNEGO 7.10.8
CURL_VERSION_SSL 7.10
CURL_VERSION_SSPI 7.13.2

View File

@@ -1,38 +0,0 @@
#
# Build test apps for the Hiper project
# During dev at least, we use a static libcurl.
#
LDFLAGS = -lcrypt -lidn -lssl -lcrypto -lz -lresolv -L../ares/.libs \
-lcares
LIBCURL = -L../lib/.libs/ -lcurl
CFLAGS = -I../include -g
all: shiper hiper hipev ulimiter
hiper: hiper.o $(LIBCURL)
$(CC) -o $@ $< $(LIBCURL) $(LDFLAGS)
hiper.o: hiper.c
$(CC) $(CFLAGS) -c $<
hipev: hipev.o $(LIBCURL)
$(CC) -o $@ $< $(LIBCURL) $(LDFLAGS) -levent
hipev.o: hipev.c
$(CC) $(CFLAGS) -c $<
shiper: shiper.o $(LIBCURL)
$(CC) -o $@ $< $(LIBCURL) $(LDFLAGS)
shiper.o: shiper.c
$(CC) $(CFLAGS) -c $<
ulimiter: ulimiter.c
$(CC) -o $@ $<
clean:
rm -f hiper.o hiper shiper shiper.o *~ ulimiter
$(LIBCURL):
(cd ../lib && make)

View File

@@ -1,300 +0,0 @@
Date: January 5, 2006
Author: Daniel Stenberg
Status of project Hiper - high performance libcurl modifications
================================================================
What is Hiper
You won't find such a description in this document. See
http://curl.haxx.se/libcurl/hiper/ for further details.
Live Progress Info
During my work, I've posted occational updates on the curl-library mailing
list but more importantly done frequent updates of
http://curl.haxx.se/libcurl/hiper/schedule.html
Schedule
I took time off my regular job during Decemember 2005 and the first week of
January 2006 to work on hiper full-time.
Step 1 - Measure the Existing Solution
I started full-time work on project Hiper on December 1st 2005. I began by
putting together a test application that used the existing API to allow me
to properly and with accuracy measure execution and transfer speeds when
doing a large amount of transfers.
I soon discovered that it was impossible to do any sensible measurements by
using live and actual URLs since the transfers were too unrelialble and
uncontrolled. I then enhanced the current HTTP server in the curl test suite
and made that support a large amount of transfers and some extra magic
"commands" that would make the server either just sit "idle" or "stream"
(continuously sending data in a never-ending stream). I then wrote up two
files using the curl test suite file format and by acessing the properly
formatted URLs on my localhost the HTTP server would either run "idle" or
run "stream".
Having this working, I patched libcurl to always only recv() a single byte
off the network each time, just to make sure that the time spent on reading
data is constant and never very long.
I adjusted the test application (actually called 'hiper') to create Y idle
transfers and Z stream transfers, had it run for N seconds and then quit and
produce a summary on stdout. Now I got very solid and repeatable results. I
started to run repeated tests and save the results when I ran into the
dreaded 1024 socket maximum limit.
One side of the problem is that the fd_set type only allows 1024 file
descriptors (on my Linux), which I had to solve by simply making my own type
with room for more connections and do ugly typecasts in the code. The other
side of the problem is that user applications have a limit imposed by the
system on the maximum amount of file descriptors it can have open and I had
to work around that by writing a special tool that runs setuid root that
increases the limit, downgrades to a normal user again and then run the
command line of your choice. This second approach has to be used for both
'hiper' and the test HTTP server. (You need to build the HTTP server with
CURL_SWS_FORK_ENABLED defined to have it do forks since it isn't desirable
to do so when running the normal curl tests.)
Now I could run my test program without problems. I decided to run the tests
with 1 stream connection and a varying amount of idle ones. I did 1001,
2001, 3001, 5001 and 9001 connections and measured how long select() and
curl_multi_perform() (including the curl_multi_fdset() call) would take in
average, over a period of 20 seconds. I ran each test 5-6 times and I used
the average time of all the runs.
The times in number of microseconds:
Connections multi_perform select
1001 3504 951
2001 7606 1988
3001 11045 2715
5001 16406 4024
9001 32147 8030
Test system
CPU: Athlon XP 2800
RAM: 1 GB
Linux: 2.6
glibc: 2.3.5
libcurl: 7.15.1
The only reason I stopped at 9001 connections is that my test machine ran
out of avaiable memory by then as I ran the test server on the same machine,
and I didn't want to risk the test result accuracy by having it start using
the swap during the tests.
It means that at 9000 connections we spend 40ms for each socket action, even
when only one socket ever have action.
With these 32000 microseconds curl_multi_perform() takes for 9000
connections, it loops 18000 laps which makes less than 2 microseconds per
lap. (Of course counting time/laps is an oversimplification, but anyway.)
Hopefully we should achieve less than 10 microseconds for each call to
curl_multi_socket() for an active connection.
The timing graph displayed on the libevent site (duplicated on the hiper
project page) suggests that libevent is pretty much fixed at 50 microseconds
(although I don't know what test box was used in their testing, we can
compare the select()-times from my tests and see that they are at least
resonably close).
Summing up, the current ~40 ms spent at 9000 connections could then possibly
be lowered to something around 60 us!
Step 2 - Implement curl_multi_socket API
Most of the design decisions and debates about this new API have already
been held on the curl-library mailing list a long time ago so I had a basic
idea on what approach to use. The main ideas of the new API are simply:
1 - The application can use whatever event system it likes as it gets info
from libcurl about what file descriptors libcurl waits for what action
on. (The previous API returns fd_sets which is very select()-centric).
2 - When the application discovers action on a single socket, it calls
libcurl and informs that there was action on this particular socket and
libcurl can then act on that socket/transfer only and not care about
any other transfers. (The previous API always had to scan through all
the existing transfers.)
The idea is that curl_multi_socket() calls a given callback with information
about what socket to wait for what action on, and the callback only gets
called if the status of that socket has changed.
In the API draft from before, we have a timeout argument on a per socket
basis and we also allowed curl_multi_socket() to pass in an 'easy handle'
instead of socket to allow libcurl to shortcut a lookup and work on the
affected easy handle right away. Both these turned out to be bad ideas.
The timeout argument was removed from the socket callback since after much
thinking I came to the conclusion that we really don't want to handle
timeouts on a per socket basis. We need it on a per transfer (easy handle)
basis and thus we can't provide it in the callbacks in a nice way. Instead,
we have to offer a curl_multi_timeout() that returns the largest amount of
time we should wait before we call the "timeout action" of libcurl, to
trigger the proper internal timeout action on the affected transfer. To get
this to work, I added a struct to each easy handle in which we store an
"expire time" (if any). The structs are then "splay sorted" so that we can
add and remove times from the linked list and yet somewhat swiftly figure
out 1 - how long time there is until the next timer expires and 2 - which
timer (handle) should we take care of now. Of course, the upside of all this
is that we get a curl_multi_timeout() that should also work with old-style
applications that use curl_multi_perform().
The easy handle argument was removed fom the curl_multi_socket() function
because having it there would require the application to do a socket to easy
handle conversion on its own. I find it very unlikely that applications
would want to do that and since libcurl would need such a lookup on its own
anyway since we didn't want to force applications to do that translation
code (it would be optional), it seemed like an unnecessary option. I also
realized that when we use underlying libraries such as c-ares (for DNS
asynch resolving) there might in fact be more than one transfer waiting for
action on the same socket and thus it makes the lookup even tricker and even
less likely to ever get done by applications. Instead I created an internal
"socket to easy handles" hash table that given a socket (file descriptor)
returns a list of easy handles that waits for some action on that socket.
To make libcurl be able to report plain sockets in the socket callback, I
had to re-organize the internals of the curl_multi_fdset() etc so that the
conversion from sockets to fd_sets for that function is only done in the
last step before the data is returned. I also had to extend c-ares to get a
function that can return plain sockets, as that library too returned only
fd_sets and that is no longer good enough. The changes done to c-ares have
been committed and are available in the c-ares CVS repository destined to be
included in the upcoming c-ares 1.3.1 release.
The 'shiper' tool is the test application I wrote that uses the new
curl_multi_socket() in its current state. It seems to be working and it uses
the API as it is documented and supposed to work. It is still using
select(), because I needed that during development (like until I had the
socket hash implemented etc) and because I haven't yet learned how to use
libevent or similar.
The hiper/shiper tools are very simple and initiates lots of connections and
have them running for the test period and then kills them all.
Since I wasn't done with the implementation until early January I haven't
had time to run very many measurements and checks, but I have done a few
runs with up to a few hundred connections (with a single active one). The
curl_multi_socket() invoke then takes 3-6 microseconds in average (using the
read-only-1-byte-at-a-time hack). If this number does increase a lot when we
add connections, it certainly matches my in my opinion very ambitious goal.
We are now below the 60 microseconds "per socket action" goal. It is
destined to be somewhat higher the more connections we have since the hash
table gets more populated and the splay tree will grow etc.
Some tests at 7000 and 9000 connections showed that the socket hash lookup
is somewhat of a bottle neck. Its current implementation may be a bit too
limiting. It simply has a fixed-size array, and on each entry in the array
it has a linked list with entries. So the hash only checks which list to
scan through. The code I had used so for used a list with merely 7 slots (as
that is what the DNS hash uses) but with 7000 connections that would make an
average of 1000 nodes in each list to run through. I upped that to 97 slots
(I believe a prime is suitable) and noticed a significant speed increase. I
need to reconsider the hash implementation or use a rather large default
value like this. At 9000 connections I was still below 10us per call.
Status Right Now
The curl_multi_socket() API is implemented according to how it is
documented. The man pages for curl_multi_socket and curl_multi_timeout are
both committed to CVS and are available online for easy browsing:
http://curl.haxx.se/libcurl/c/curl_multi_socket.html
http://curl.haxx.se/libcurl/c/curl_multi_timeout.html
The hiper-5.patch I made available early morning January 5th, 2006 should
apply fine on a recent CVS checkout (at the time of this writing curl 7.15.1
is the latest public curl release but the hiper patch does not apply fine on
that).
What is Left for the curl_multi_socket API
1 - More measuring with more extreme number of connections
2 - More testing with actual URLs and complete from start to end transfers.
I'm quite sure we don't set expire times all over in the code properly, so
there is bound to be some timeout bugs left.
What it really takes is for me to commit the code and to make an official
release with it so that we get people "out there" to help out testing it.
What is Left for project Hiper
1 - Add HTTP pipelining support
2 - Add a zero (or at least close to zero) copy interface
Neither of these points have been planned or detailed exactly how they will
be implemented.
Roadmap Ahead
I plan and hope to return to full-time hiper work later on this spring or
possibly summer to continue where I pause now. Of course some spare time
might also be spent until then to get us moving forward.
---------------------------------------------------------------------------
April 11, 2006
While sitting staring on my screen trying to write up a *nice* sample script
using libevent, it strikes me that since libevent is pretty much based around
its structs that you setup for each event/file descriptor, my application
wants to figure out the correct struct that is associted with the file
descriptor that libcurl provides in the socket callback.
This feels like an operation most applications will need when using the
multi_socket API, so it feels like I should better try to figure out a decent
way to offer this basic functionality already in libcurl - and the fact that
we already have the file descriptors in a hash we can probably just as well
extend it somewhat and store some custom pointers as well.
We need to offer the app a way to set a private pointer to be associated with
the particular file descriptor, and then be able to provide that pointer on
subsequent callback calls.
---------------------------------------------------------------------------
April 20, 2006
I was wrong when I previously claimed we could have more than one easy handle
using the same socket. I've cleaned up and simplified code now to adjust to
this.
---------------------------------------------------------------------------
July 9, 2006
TODO: We need to alter how we use c-ares for getting info about its sockets,
as c-ares now provides a callback approach very similar to how libcurl is
about to work.
I'm adding a function called curl_multi_assign() that will set a private
pointer added to the internal libcurl hash table for the particular socket
passed in to this function:
CURLMcode curl_multi_assign(CURLM *multi_handle,
curl_socket_t sockfd,
void *sockp);
'sockp' being a custom pointer set by the application to be associated with
this socket. The socket has to be already existing and in-use by libcurl,
like having already called the callback telling about its existance.
The set hashp pointer will then be passed on to the callback in upcoming
calls when this same socket is used (in the brand new 'socketp' argument).
---------------------------------------------------------------------------
July 30, 2006
Shockingly stupid (of me not having realized this before), but we really need
to add a 'running_handles' argument to the curl_multi_socket() and
curl_multi_socket_all() prototypes so that the caller can get to know when
all the transfers are actually done!

View File

@@ -1,34 +0,0 @@
#!/usr/bin/perl
# 1) http://randomurl.com/body.php
# 2) http://random.yahoo.com/fast/ryl
# 3) http://www.uroulette.com/visit
# 1) very slow, responds with URL in body meta style:
# <meta http-equiv="refresh" content="0; url=http://www.webmasterworld.com/forum85/735.htm">
# 2) Responds with non-HTTP headers like:
# Status: 301
# Location: http://www.adaptive.net/
# 3) ordinary 30X code and Location:
my $url;
map { $url .= " http://www.uroulette.com/visit"; } (1 .. 12);
print $url."\n";
my $count=0;
open(DUMP, ">>dump");
while(1) {
my @getit = `curl -si $url`;
for my $l (@getit) {
if($l =~ /^Location: (.*)/) {
print DUMP "$1\n";
print STDERR "$count\r";
$count++;
}
}
}

View File

@@ -1,416 +0,0 @@
/*****************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* $Id$
*
* Connect N connections. Z are idle, and X are active. Transfer as fast as
* possible.
*
* Run for a specific amount of time (10 secs for now). Output detailed timing
* information.
*
*/
/* The maximum number of simultanoues connections/transfers we support */
#define NCONNECTIONS 50000
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
#include <sys/poll.h>
#include <curl/curl.h>
#define MICROSEC 1000000 /* number of microseconds in one second */
/* The maximum time (in microseconds) we run the test */
#define RUN_FOR_THIS_LONG (20*MICROSEC)
/* Number of loops (seconds) we allow the total download amount and alive
connections to remain the same until we bail out. Set this slightly higher
when using asynch supported libcurl. */
#define IDLE_TIME 10
struct globalinfo {
size_t dlcounter;
};
struct connection {
CURL *e;
int id; /* just a counter for easy browsing */
char *url;
size_t dlcounter;
struct globalinfo *global;
char error[CURL_ERROR_SIZE];
};
/* on port 8999 we run a modified (fork-) sws that supports pure idle and full
stream mode */
#define PORT "8999"
#define HOST "192.168.1.13"
#define URL_IDLE "http://" HOST ":" PORT "/1000"
#define URL_ACTIVE "http://" HOST ":" PORT "/1001"
static size_t
writecallback(void *ptr, size_t size, size_t nmemb, void *data)
{
size_t realsize = size * nmemb;
struct connection *c = (struct connection *)data;
c->dlcounter += realsize;
c->global->dlcounter += realsize;
#if 0
printf("%02d: %d, total %d\n",
c->id, c->dlcounter, c->global->dlcounter);
#endif
return realsize;
}
/* return the diff between two timevals, in us */
static long tvdiff(struct timeval *newer, struct timeval *older)
{
return (newer->tv_sec-older->tv_sec)*1000000+
(newer->tv_usec-older->tv_usec);
}
/* store the start time of the program in this variable */
static struct timeval timer;
static void timer_start(void)
{
/* capture the time of the start moment */
gettimeofday(&timer, NULL);
}
static struct timeval cont; /* at this moment we continued */
int still_running; /* keep number of running handles */
struct conncount {
long time_us;
long laps;
long maxtime;
};
static struct timeval timerpause;
static void timer_pause(void)
{
/* capture the time of the pause moment */
gettimeofday(&timerpause, NULL);
/* If we have a previous continue (all times except the first), we can now
store the time for a whole "lap" */
if(cont.tv_sec) {
long lap;
lap = tvdiff(&timerpause, &cont);
}
}
static long paused; /* amount of us we have been pausing */
static void timer_continue(void)
{
/* Capture the time of the restored operation moment, now calculate how long
time we were paused and added that to the 'paused' variable.
*/
gettimeofday(&cont, NULL);
paused += tvdiff(&cont, &timerpause);
}
static long total; /* amount of us from start to stop */
static void timer_total(void)
{
struct timeval stop;
/* Capture the time of the operation stopped moment, now calculate how long
time we were running and how much of that pausing.
*/
gettimeofday(&stop, NULL);
total = tvdiff(&stop, &timer);
}
struct globalinfo info;
struct connection *conns;
long selects;
long selectsalive;
long timeouts;
long perform;
long performalive;
long performselect;
long topselect;
int num_total;
int num_idle;
int num_active;
static void report(void)
{
int i;
long active = total - paused;
long numdl = 0;
for(i=0; i < num_total; i++) {
if(conns[i].dlcounter)
numdl++;
}
printf("Summary from %d simultanoues transfers (%d active)\n",
num_total, num_active);
printf("%d out of %d connections provided data\n", numdl, num_total);
printf("Total time: %ldus select(): %ldus curl_multi_perform(): %ldus\n",
total, paused, active);
printf("%d calls to curl_multi_perform() average %d alive "
"Average time: %dus\n",
perform, performalive/perform, active/perform);
printf("%d calls to select(), average %d alive "
"Average time: %dus\n",
selects, selectsalive/selects,
paused/selects);
printf(" Average number of readable connections per select() return: %d\n",
performselect/selects);
printf(" Max number of readable connections for a single select() "
"return: %d\n",
topselect);
printf("%ld select() timeouts\n", timeouts);
printf("Downloaded %ld bytes in %ld bytes/sec, %ld usec/byte\n",
info.dlcounter,
info.dlcounter/(total/1000000),
total/info.dlcounter);
#if 0
for(i=1; i< num_total; i++) {
if(timecount[i].laps) {
printf("Time %d connections, average %ld max %ld (%ld laps) "
"average/conn: %ld\n",
i,
timecount[i].time_us/timecount[i].laps,
timecount[i].maxtime,
timecount[i].laps,
(timecount[i].time_us/timecount[i].laps)/i );
}
}
#endif
}
struct ourfdset {
char fdbuffer[NCONNECTIONS/8];
};
#define FD2_ZERO(x) FD_ZERO((fd_set *)x)
typedef struct ourfdset fd2_set;
int main(int argc, char **argv)
{
CURLM *multi_handle;
CURLMsg *msg;
CURLcode code = CURLE_OK;
CURLMcode mcode = CURLM_OK;
int rc;
int i;
int prevalive=-1;
int prevsamecounter=0;
int prevtotal = -1;
fd2_set fdsizecheck;
int selectmaxamount;
memset(&info, 0, sizeof(struct globalinfo));
selectmaxamount = sizeof(fdsizecheck) * 8;
printf("select() supports max %d connections\n", selectmaxamount);
if(argc < 3) {
printf("Usage: hiper [num idle] [num active]\n");
return 1;
}
num_idle = atoi(argv[1]);
num_active = atoi(argv[2]);
num_total = num_idle + num_active;
if(num_total > selectmaxamount) {
printf("Requested more connections than supported!\n");
return 4;
}
conns = calloc(num_total, sizeof(struct connection));
if(!conns) {
printf("Out of memory\n");
return 3;
}
if(num_total >= NCONNECTIONS) {
printf("Increase NCONNECTIONS!\n");
return 2;
}
/* init the multi stack */
multi_handle = curl_multi_init();
for(i=0; i< num_total; i++) {
CURL *e;
char *nl;
memset(&conns[i], 0, sizeof(struct connection));
if(i < num_idle)
conns[i].url = URL_IDLE;
else
conns[i].url = URL_ACTIVE;
#if 0
printf("%d: Add URL %s\n", i, conns[i].url);
#endif
e = curl_easy_init();
if(!e) {
printf("curl_easy_init() for handle %d failed, exiting!\n", i);
return 2;
}
conns[i].e = e;
conns[i].id = i;
conns[i].global = &info;
curl_easy_setopt(e, CURLOPT_URL, conns[i].url);
curl_easy_setopt(e, CURLOPT_WRITEFUNCTION, writecallback);
curl_easy_setopt(e, CURLOPT_WRITEDATA, &conns[i]);
#if 1
curl_easy_setopt(e, CURLOPT_VERBOSE, 1);
#endif
curl_easy_setopt(e, CURLOPT_ERRORBUFFER, conns[i].error);
curl_easy_setopt(e, CURLOPT_PRIVATE, &conns[i]);
/* add the easy to the multi */
if(CURLM_OK != curl_multi_add_handle(multi_handle, e)) {
printf("curl_multi_add_handle() returned error for %d\n", i);
return 3;
}
}
/* we start some action by calling perform right away */
while(CURLM_CALL_MULTI_PERFORM ==
curl_multi_perform(multi_handle, &still_running));
printf("Starting timer, expects to run for %ldus\n", RUN_FOR_THIS_LONG);
timer_start();
while(still_running == num_total) {
struct timeval timeout;
int rc; /* select() return code */
long timeout_ms;
fd2_set fdread;
fd2_set fdwrite;
fd2_set fdexcep;
int maxfd;
FD2_ZERO(&fdread);
FD2_ZERO(&fdwrite);
FD2_ZERO(&fdexcep);
curl_multi_timeout(multi_handle, &timeout_ms);
/* set timeout to wait */
timeout.tv_sec = timeout_ms/1000;
timeout.tv_usec = (timeout_ms%1000)*1000;
/* get file descriptors from the transfers */
curl_multi_fdset(multi_handle,
(fd_set *)&fdread,
(fd_set *)&fdwrite,
(fd_set *)&fdexcep, &maxfd);
timer_pause();
selects++;
selectsalive += still_running;
rc = select(maxfd+1,
(fd_set *)&fdread,
(fd_set *)&fdwrite,
(fd_set *)&fdexcep, &timeout);
#if 0
/* Output this here to make it outside the timer */
printf("Running: %d (%d bytes)\n", still_running, info.dlcounter);
#endif
timer_continue();
switch(rc) {
case -1:
/* select error */
break;
case 0:
timeouts++;
default:
/* timeout or readable/writable sockets */
do {
perform++;
performalive += still_running;
}
while(CURLM_CALL_MULTI_PERFORM ==
curl_multi_perform(multi_handle, &still_running));
performselect += rc;
if(rc > topselect)
topselect = rc;
break;
}
if(total > RUN_FOR_THIS_LONG) {
printf("Stopped after %ldus\n", total);
break;
}
if(prevalive != still_running) {
printf("%d connections alive\n", still_running);
}
prevalive = still_running;
timer_total(); /* calculate the total time spent so far */
}
if(still_running != num_total) {
/* something made connections fail, extract the reason and tell */
int msgs_left;
struct connection *cptr;
while ((msg = curl_multi_info_read(multi_handle, &msgs_left))) {
if (msg->msg == CURLMSG_DONE) {
curl_easy_getinfo(msg->easy_handle, CURLINFO_PRIVATE, &cptr);
printf("%d => (%d) %s", cptr->id, msg->data.result, cptr->error);
}
}
}
curl_multi_cleanup(multi_handle);
/* cleanup all the easy handles */
for(i=0; i< num_total; i++)
curl_easy_cleanup(conns[i].e);
report();
return code;
}

View File

@@ -1,410 +0,0 @@
/*****************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* $Id$
*
* Connect N connections. Z are idle, and X are active. Transfer as fast as
* possible.
*
* Output detailed timing information.
*
* Uses libevent.
*
*/
/* The maximum number of simultanoues connections/transfers we support */
#define NCONNECTIONS 50000
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
#include <sys/poll.h>
#include <curl/curl.h>
#include <event.h> /* for libevent */
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
#define MICROSEC 1000000 /* number of microseconds in one second */
/* The maximum time (in microseconds) we run the test */
#define RUN_FOR_THIS_LONG (5*MICROSEC)
/* Number of loops (seconds) we allow the total download amount and alive
connections to remain the same until we bail out. Set this slightly higher
when using asynch supported libcurl. */
#define IDLE_TIME 10
struct globalinfo {
size_t dlcounter;
};
struct connection {
CURL *e;
int id; /* just a counter for easy browsing */
char *url;
size_t dlcounter;
struct globalinfo *global;
char error[CURL_ERROR_SIZE];
};
/* this is the struct associated with each file descriptor libcurl tells us
it is dealing with */
struct fdinfo {
/* create a link list of fdinfo structs */
struct fdinfo *next;
struct fdinfo *prev;
curl_socket_t sockfd;
CURL *easy;
int action; /* as set by libcurl */
long timeout; /* as set by libcurl */
struct event ev; /* */
int evset; /* true if the 'ev' struct has been used in a event_set() call */
CURLM *multi; /* pointer to the multi handle */
int *running_handles; /* pointer to the running_handles counter */
};
static struct fdinfo *allsocks;
static int running_handles;
/* we have the timerevent global so that when the final socket-based event is
done, we can remove the timerevent as well */
static struct event timerevent;
static void update_timeout(CURLM *multi_handle);
/* called from libevent on action on a particular socket ("event") */
static void eventcallback(int fd, short type, void *userp)
{
struct fdinfo *fdp = (struct fdinfo *)userp;
CURLMcode rc;
fprintf(stderr, "EVENT callback type %d\n", type);
/* tell libcurl to deal with the transfer associated with this socket */
do {
rc = curl_multi_socket(fdp->multi, fd, fdp->running_handles);
} while (rc == CURLM_CALL_MULTI_PERFORM);
if(rc) {
fprintf(stderr, "curl_multi_socket() returned %d\n", (int)rc);
}
fprintf(stderr, "running_handles: %d\n", *fdp->running_handles);
if(!*fdp->running_handles) {
/* last transfer is complete, kill pending timeout */
fprintf(stderr, "last transfer done, kill timeout\n");
if(evtimer_pending(&timerevent, NULL))
evtimer_del(&timerevent);
}
else
update_timeout(fdp->multi);
}
/* called from libevent when our timer event expires */
static void timercallback(int fd, short type, void *userp)
{
(void)fd; /* not used for this */
(void)type; /* ignored in here */
CURLM *multi_handle = (CURLM *)userp;
int running_handles;
CURLMcode rc;
fprintf(stderr, "EVENT timeout\n");
/* tell libcurl to deal with the transfer associated with this socket */
do {
rc = curl_multi_socket(multi_handle, CURL_SOCKET_TIMEOUT,
&running_handles);
} while (rc == CURLM_CALL_MULTI_PERFORM);
if(running_handles)
/* Get the current timeout value from libcurl and set a new timeout */
update_timeout(multi_handle);
}
static void remsock(struct fdinfo *f)
{
if(!f)
/* did not find socket to remove! */
return;
if(f->evset)
event_del(&f->ev);
if(f->prev)
f->prev->next = f->next;
if(f->next)
f->next->prev = f->prev;
else
/* this was the last entry */
allsocks = NULL;
}
static void setsock(struct fdinfo *fdp, curl_socket_t s, CURL *easy,
int action)
{
fdp->sockfd = s;
fdp->action = action;
fdp->easy = easy;
if(fdp->evset)
/* first remove the existing event if the old setup was used */
event_del(&fdp->ev);
/* now use and add the current socket setup to libevent. The EV_PERSIST is
the key here as otherwise libevent will automatically remove the event
when it occurs the first time */
event_set(&fdp->ev, fdp->sockfd,
(action&CURL_POLL_IN?EV_READ:0)|
(action&CURL_POLL_OUT?EV_WRITE:0)| EV_PERSIST,
eventcallback, fdp);
fdp->evset=1;
fprintf(stderr, "event_add() for fd %d\n", s);
/* We don't use any socket-specific timeout but intead we use a single
global one. This is (mostly) because libcurl doesn't expose any
particular socket- based timeout value. */
event_add(&fdp->ev, NULL);
}
static void addsock(curl_socket_t s, CURL *easy, int action, CURLM *multi)
{
struct fdinfo *fdp = calloc(sizeof(struct fdinfo), 1);
fdp->multi = multi;
fdp->running_handles = &running_handles;
setsock(fdp, s, easy, action);
if(allsocks) {
fdp->next = allsocks;
allsocks->prev = fdp;
/* now set allsocks to point to the new struct */
allsocks = fdp;
}
else
allsocks = fdp;
/* Set this association in libcurl */
curl_multi_assign(multi, s, fdp);
}
/* on port 8999 we run a fork enabled sws that supports 'idle' and 'stream' */
#define PORT "8999"
#define HOST "127.0.0.1"
#define URL_IDLE "http://" HOST ":" PORT "/1000"
#if 1
#define URL_ACTIVE "http://" HOST ":" PORT "/1001"
#else
#define URL_ACTIVE "http://localhost/"
#endif
static int socket_callback(CURL *easy, /* easy handle */
curl_socket_t s, /* socket */
int what, /* see above */
void *cbp, /* callback pointer */
void *socketp) /* socket pointer */
{
struct fdinfo *fdp = (struct fdinfo *)socketp;
char *whatstr[]={
"none",
"IN",
"OUT",
"INOUT",
"REMOVE"};
fprintf(stderr, "socket %d easy %p what %s\n", s, easy,
whatstr[what]);
if(what == CURL_POLL_REMOVE)
remsock(fdp);
else {
if(!fdp) {
/* not previously known, add it and set association */
printf("Add info for socket %d %s%s\n", s,
what&CURL_POLL_IN?"READ":"",
what&CURL_POLL_OUT?"WRITE":"" );
addsock(s, easy, what, cbp);
}
else {
/* we already know about it, just change action/timeout */
printf("Changing info for socket %d from %d to %d\n",
s, fdp->action, what);
setsock(fdp, s, easy, what);
}
}
return 0; /* return code meaning? */
}
static size_t
writecallback(void *ptr, size_t size, size_t nmemb, void *data)
{
size_t realsize = size * nmemb;
struct connection *c = (struct connection *)data;
(void)ptr;
c->dlcounter += realsize;
c->global->dlcounter += realsize;
printf("%02d: %d, total %d\n",
c->id, c->dlcounter, c->global->dlcounter);
return realsize;
}
struct globalinfo info;
struct connection *conns;
int num_total;
int num_idle;
int num_active;
static void update_timeout(CURLM *multi_handle)
{
long timeout_ms;
struct timeval timeout;
/* Since we need a global timeout to occur after a given time of inactivity,
we use a single timeout-event. Get the timeout value from libcurl, and
update it after every call to libcurl. */
curl_multi_timeout(multi_handle, &timeout_ms);
/* convert ms to timeval */
timeout.tv_sec = timeout_ms/1000;
timeout.tv_usec = (timeout_ms%1000)*1000;
evtimer_add(&timerevent, &timeout);
}
int main(int argc, char **argv)
{
CURLM *multi_handle;
CURLMsg *msg;
CURLcode code = CURLE_OK;
int i;
memset(&info, 0, sizeof(struct globalinfo));
if(argc < 3) {
printf("Usage: hiper-event [num idle] [num active]\n");
return 1;
}
num_idle = atoi(argv[1]);
num_active = atoi(argv[2]);
num_total = num_idle + num_active;
conns = calloc(num_total, sizeof(struct connection));
if(!conns) {
printf("Out of memory\n");
return 3;
}
if(num_total >= NCONNECTIONS) {
printf("Too many connections requested, increase NCONNECTIONS!\n");
return 2;
}
event_init(); /* Initalize the event library */
printf("About to do %d connections\n", num_total);
/* init the multi stack */
multi_handle = curl_multi_init();
/* initialize the timeout event */
evtimer_set(&timerevent, timercallback, multi_handle);
for(i=0; i< num_total; i++) {
CURL *e;
memset(&conns[i], 0, sizeof(struct connection));
if(i < num_idle)
conns[i].url = URL_IDLE;
else
conns[i].url = URL_ACTIVE;
e = curl_easy_init();
if(!e) {
printf("curl_easy_init() for handle %d failed, exiting!\n", i);
return 2;
}
conns[i].e = e;
conns[i].id = i;
conns[i].global = &info;
curl_easy_setopt(e, CURLOPT_URL, conns[i].url);
curl_easy_setopt(e, CURLOPT_WRITEFUNCTION, writecallback);
curl_easy_setopt(e, CURLOPT_WRITEDATA, &conns[i]);
curl_easy_setopt(e, CURLOPT_VERBOSE, 0);
curl_easy_setopt(e, CURLOPT_ERRORBUFFER, conns[i].error);
curl_easy_setopt(e, CURLOPT_PRIVATE, &conns[i]);
/* add the easy to the multi */
if(CURLM_OK != curl_multi_add_handle(multi_handle, e)) {
printf("curl_multi_add_handle() returned error for %d\n", i);
return 3;
}
}
curl_multi_setopt(multi_handle, CURLMOPT_SOCKETFUNCTION, socket_callback);
curl_multi_setopt(multi_handle, CURLMOPT_SOCKETDATA, multi_handle);
/* we start the action by calling *socket_all() */
while(CURLM_CALL_MULTI_PERFORM == curl_multi_socket_all(multi_handle,
&running_handles));
/* update timeout */
update_timeout(multi_handle);
/* event_dispatch() runs the event main loop. It ends when no events are
left to wait for. */
event_dispatch();
{
/* something made connections fail, extract the reason and tell */
int msgs_left;
struct connection *cptr;
while ((msg = curl_multi_info_read(multi_handle, &msgs_left))) {
if (msg->msg == CURLMSG_DONE) {
curl_easy_getinfo(msg->easy_handle, CURLINFO_PRIVATE, &cptr);
printf("%d => (%d) %s\n",
cptr->id, msg->data.result, cptr->error);
}
}
}
curl_multi_cleanup(multi_handle);
/* cleanup all the easy handles */
for(i=0; i< num_total; i++)
curl_easy_cleanup(conns[i].e);
return code;
}

View File

@@ -1,557 +0,0 @@
/*****************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* $Id$
*
* Connect N connections. Z are idle, and X are active. Transfer as fast as
* possible.
*
* Run for a specific amount of time (10 secs for now). Output detailed timing
* information.
*
* The same is hiper.c but instead using the new *socket() API instead of the
* "old" *perform() call.
*
* Uses a select() approach but only for keeping the code simple and
* stand-alone. See hipev.c for a libevent-based example.
*
*/
/* The maximum number of simultanoues connections/transfers we support */
#define NCONNECTIONS 50000
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
#include <sys/poll.h>
#include <curl/curl.h>
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
#define MICROSEC 1000000 /* number of microseconds in one second */
/* The maximum time (in microseconds) we run the test */
#define RUN_FOR_THIS_LONG (5*MICROSEC)
/* Number of loops (seconds) we allow the total download amount and alive
connections to remain the same until we bail out. Set this slightly higher
when using asynch supported libcurl. */
#define IDLE_TIME 10
struct ourfdset {
/* __fds_bits is what the Linux glibc headers use when they declare the
fd_set struct so by using this we can actually avoid the typecase for the
FD_SET() macro usage but it would hardly be portable */
char __fds_bits[NCONNECTIONS/8];
};
#define FD2_ZERO(x) memset(x, 0, sizeof(struct ourfdset))
typedef struct ourfdset fd2_set;
struct globalinfo {
size_t dlcounter;
};
struct connection {
CURL *e;
int id; /* just a counter for easy browsing */
char *url;
size_t dlcounter;
struct globalinfo *global;
char error[CURL_ERROR_SIZE];
};
struct fdinfo {
/* create a link list of fdinfo structs */
struct fdinfo *next;
struct fdinfo *prev;
curl_socket_t sockfd;
CURL *easy;
int action; /* as set by libcurl */
long timeout; /* as set by libcurl */
};
static struct fdinfo *allsocks;
static struct fdinfo *findsock(curl_socket_t s)
{
/* return the struct for the given socket */
struct fdinfo *fdp = allsocks;
while(fdp) {
if(fdp->sockfd == s)
break;
fdp = fdp->next;
}
return fdp; /* a struct pointer or NULL */
}
static void remsock(curl_socket_t s)
{
struct fdinfo *fdp = allsocks;
while(fdp) {
if(fdp->sockfd == s)
break;
fdp = fdp->next;
}
if(!fdp)
/* did not find socket to remove! */
return;
if(fdp->prev)
fdp->prev->next = fdp->next;
if(fdp->next)
fdp->next->prev = fdp->prev;
else
/* this was the last entry */
allsocks = NULL;
}
static void setsock(struct fdinfo *fdp, curl_socket_t s, CURL *easy,
int action)
{
fdp->sockfd = s;
fdp->action = action;
fdp->easy = easy;
}
static void addsock(curl_socket_t s, CURL *easy, int action)
{
struct fdinfo *fdp = calloc(sizeof(struct fdinfo), 1);
setsock(fdp, s, easy, action);
if(allsocks) {
fdp->next = allsocks;
allsocks->prev = fdp;
/* now set allsocks to point to the new struct */
allsocks = fdp;
}
else
allsocks = fdp;
}
static void fdinfo2fdset(fd2_set *fdread, fd2_set *fdwrite, int *maxfd)
{
struct fdinfo *fdp = allsocks;
int writable=0;
FD2_ZERO(fdread);
FD2_ZERO(fdwrite);
*maxfd = 0;
#if 0
printf("Wait for: ");
#endif
while(fdp) {
if(fdp->action & CURL_POLL_IN) {
FD_SET(fdp->sockfd, (fd_set *)fdread);
}
if(fdp->action & CURL_POLL_OUT) {
FD_SET(fdp->sockfd, (fd_set *)fdwrite);
writable++;
}
#if 0
printf("%d (%s%s) ",
fdp->sockfd,
(fdp->action & CURL_POLL_IN)?"r":"",
(fdp->action & CURL_POLL_OUT)?"w":"");
#endif
if(fdp->sockfd > *maxfd)
*maxfd = fdp->sockfd;
fdp = fdp->next;
}
#if 0
if(writable)
printf("Check for %d writable sockets\n", writable);
#endif
}
/* on port 8999 we run a fork enabled sws that supports 'idle' and 'stream' */
#define PORT "8999"
#define HOST "192.168.1.13"
#define URL_IDLE "http://" HOST ":" PORT "/1000"
#define URL_ACTIVE "http://" HOST ":" PORT "/1001"
static int socket_callback(CURL *easy, /* easy handle */
curl_socket_t s, /* socket */
int what, /* see above */
void *userp) /* "private" pointer */
{
struct fdinfo *fdp;
printf("socket %d easy %p what %d\n", s, easy, what);
if(what == CURL_POLL_REMOVE)
remsock(s);
else {
fdp = findsock(s);
if(!fdp) {
addsock(s, easy, what);
}
else {
/* we already know about it, just change action/timeout */
printf("Changing info for socket %d from %d to %d\n",
s, fdp->action, what);
setsock(fdp, s, easy, what);
}
}
return 0; /* return code meaning? */
}
static size_t
writecallback(void *ptr, size_t size, size_t nmemb, void *data)
{
size_t realsize = size * nmemb;
struct connection *c = (struct connection *)data;
c->dlcounter += realsize;
c->global->dlcounter += realsize;
#if 0
printf("%02d: %d, total %d\n",
c->id, c->dlcounter, c->global->dlcounter);
#endif
return realsize;
}
/* return the diff between two timevals, in us */
static long tvdiff(struct timeval *newer, struct timeval *older)
{
return (newer->tv_sec-older->tv_sec)*1000000+
(newer->tv_usec-older->tv_usec);
}
/* store the start time of the program in this variable */
static struct timeval timer;
static void timer_start(void)
{
/* capture the time of the start moment */
gettimeofday(&timer, NULL);
}
static struct timeval cont; /* at this moment we continued */
int still_running; /* keep number of running handles */
struct conncount {
long time_us;
long laps;
long maxtime;
};
static struct timeval timerpause;
static void timer_pause(void)
{
/* capture the time of the pause moment */
gettimeofday(&timerpause, NULL);
/* If we have a previous continue (all times except the first), we can now
store the time for a whole "lap" */
if(cont.tv_sec) {
long lap;
lap = tvdiff(&timerpause, &cont);
}
}
static long paused; /* amount of us we have been pausing */
static void timer_continue(void)
{
/* Capture the time of the restored operation moment, now calculate how long
time we were paused and added that to the 'paused' variable.
*/
gettimeofday(&cont, NULL);
paused += tvdiff(&cont, &timerpause);
}
static long total; /* amount of us from start to stop */
static void timer_total(void)
{
struct timeval stop;
/* Capture the time of the operation stopped moment, now calculate how long
time we were running and how much of that pausing.
*/
gettimeofday(&stop, NULL);
total = tvdiff(&stop, &timer);
}
struct globalinfo info;
struct connection *conns;
long selects;
long timeouts;
long multi_socket;
long performalive;
long performselect;
long topselect;
int num_total;
int num_idle;
int num_active;
static void report(void)
{
int i;
long active = total - paused;
long numdl = 0;
for(i=0; i < num_total; i++) {
if(conns[i].dlcounter)
numdl++;
}
printf("Summary from %d simultanoues transfers (%d active)\n",
num_total, num_active);
printf("%d out of %d connections provided data\n", numdl, num_total);
printf("Total time: %ldus paused: %ldus curl_multi_socket(): %ldus\n",
total, paused, active);
printf("%d calls to select() "
"Average time: %dus\n",
selects, paused/selects);
printf(" Average number of readable connections per select() return: %d\n",
performselect/selects);
printf(" Max number of readable connections for a single select() "
"return: %d\n",
topselect);
printf("%ld calls to multi_socket(), "
"Average time: %ldus\n",
multi_socket, active/multi_socket);
printf("%ld select() timeouts\n", timeouts);
printf("Downloaded %ld bytes in %ld bytes/sec, %ld usec/byte\n",
info.dlcounter,
info.dlcounter/(total/1000000),
total/info.dlcounter);
}
int main(int argc, char **argv)
{
CURLM *multi_handle;
CURLMsg *msg;
CURLcode code = CURLE_OK;
CURLMcode mcode = CURLM_OK;
int rc;
int i;
fd2_set fdsizecheck;
int selectmaxamount;
struct fdinfo *fdp;
char act;
int running_handles;
memset(&info, 0, sizeof(struct globalinfo));
selectmaxamount = sizeof(fdsizecheck) * 8;
printf("select() supports max %d connections\n", selectmaxamount);
if(argc < 3) {
printf("Usage: hiper [num idle] [num active]\n");
return 1;
}
num_idle = atoi(argv[1]);
num_active = atoi(argv[2]);
num_total = num_idle + num_active;
if(num_total > selectmaxamount) {
printf("Requested more connections than supported!\n");
return 4;
}
conns = calloc(num_total, sizeof(struct connection));
if(!conns) {
printf("Out of memory\n");
return 3;
}
if(num_total >= NCONNECTIONS) {
printf("Too many connections requested, increase NCONNECTIONS!\n");
return 2;
}
printf("About to do %d connections\n", num_total);
/* init the multi stack */
multi_handle = curl_multi_init();
for(i=0; i< num_total; i++) {
CURL *e;
char *nl;
memset(&conns[i], 0, sizeof(struct connection));
if(i < num_idle)
conns[i].url = URL_IDLE;
else
conns[i].url = URL_ACTIVE;
e = curl_easy_init();
if(!e) {
printf("curl_easy_init() for handle %d failed, exiting!\n", i);
return 2;
}
conns[i].e = e;
conns[i].id = i;
conns[i].global = &info;
curl_easy_setopt(e, CURLOPT_URL, conns[i].url);
curl_easy_setopt(e, CURLOPT_WRITEFUNCTION, writecallback);
curl_easy_setopt(e, CURLOPT_WRITEDATA, &conns[i]);
curl_easy_setopt(e, CURLOPT_VERBOSE, 0);
curl_easy_setopt(e, CURLOPT_ERRORBUFFER, conns[i].error);
curl_easy_setopt(e, CURLOPT_PRIVATE, &conns[i]);
/* add the easy to the multi */
if(CURLM_OK != curl_multi_add_handle(multi_handle, e)) {
printf("curl_multi_add_handle() returned error for %d\n", i);
return 3;
}
}
curl_multi_setopt(multi_handle, CURLMOPT_SOCKETFUNCTION, socket_callback);
curl_multi_setopt(multi_handle, CURLMOPT_SOCKETDATA, NULL);
/* we start the action by calling *socket() right away */
while(CURLM_CALL_MULTI_PERFORM == curl_multi_socket_all(multi_handle,
&running_handles));
printf("Starting timer, expects to run for %ldus\n", RUN_FOR_THIS_LONG);
timer_start();
timer_pause();
while(1) {
struct timeval timeout;
int rc; /* select() return code */
long timeout_ms;
fd2_set fdread;
fd2_set fdwrite;
int maxfd;
curl_multi_timeout(multi_handle, &timeout_ms);
/* set timeout to wait */
timeout.tv_sec = timeout_ms/1000;
timeout.tv_usec = (timeout_ms%1000)*1000;
/* convert file descriptors from the transfers to fd_sets */
fdinfo2fdset(&fdread, &fdwrite, &maxfd);
selects++;
rc = select(maxfd+1,
(fd_set *)&fdread,
(fd_set *)&fdwrite,
NULL, &timeout);
switch(rc) {
case -1:
/* select error */
break;
case 0:
timeouts++;
curl_multi_socket(multi_handle, CURL_SOCKET_TIMEOUT, &running_handles);
break;
default:
/* timeout or readable/writable sockets */
for(i=0, fdp = allsocks; fdp; fdp = fdp->next) {
act = 0;
if((fdp->action & CURL_POLL_IN) &&
FD_ISSET(fdp->sockfd, &fdread)) {
act |= CURL_POLL_IN;
i++;
}
if((fdp->action & CURL_POLL_OUT) &&
FD_ISSET(fdp->sockfd, &fdwrite)) {
act |= CURL_POLL_OUT;
i++;
}
if(act) {
multi_socket++;
timer_continue();
if(act & CURL_POLL_OUT)
act--;
curl_multi_socket(multi_handle, fdp->sockfd, &running_handles);
timer_pause();
}
}
performselect += rc;
if(rc > topselect)
topselect = rc;
break;
}
timer_total(); /* calculate the total time spent so far */
if(total > RUN_FOR_THIS_LONG) {
printf("Stopped after %ldus\n", total);
break;
}
}
if(still_running != num_total) {
/* something made connections fail, extract the reason and tell */
int msgs_left;
struct connection *cptr;
while ((msg = curl_multi_info_read(multi_handle, &msgs_left))) {
if (msg->msg == CURLMSG_DONE) {
curl_easy_getinfo(msg->easy_handle, CURLINFO_PRIVATE, &cptr);
printf("%d => (%d) %s", cptr->id, msg->data.result, cptr->error);
}
}
}
curl_multi_cleanup(multi_handle);
/* cleanup all the easy handles */
for(i=0; i< num_total; i++)
curl_easy_cleanup(conns[i].e);
report();
return code;
}

View File

@@ -1,101 +0,0 @@
/*****************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* $Id$
*
* Little tool to raise the amount of maximum file descriptor and then run the
* given command line (using the hard-coded uid/gid).
*
*/
#include <stdio.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <unistd.h>
#include <errno.h>
#include <string.h> /* for errno translation */
/* ulimiter
*
* Source code inspiration from:
* http://www.cs.wisc.edu/condor/condorg/linux_scalability.html
*/
#define UID 1000 /* the user who must run this */
#define GID 1000 /* group id to run the program as */
/* Number of open files to increase to */
#define NEW_MAX 10000
int main(int argc, char *argv[])
{
int ret;
struct rlimit rl;
char *brgv[20];
int brgc=argc-1;
int i;
for(i=1; i< argc; i++)
brgv[i-1]=argv[i];
brgv[i-1]=NULL; /* terminate the list */
if(getuid() != UID) {
fprintf(stderr, "Only uid %d is allowed to run this\n", UID);
return 1;
}
ret = getrlimit(RLIMIT_NOFILE, &rl);
if(ret != 0) {
fprintf(stderr, "Unable to read open file limit.\n"
"(getrlimit(RLIMIT_NOFILE, &rl) failed)\n"
"(%d, %s)", errno, strerror(errno));
return 1;
}
fprintf(stderr, "Limit was %d (max %d), setting to %d\n",
rl.rlim_cur, rl.rlim_max, NEW_MAX);
rl.rlim_cur = rl.rlim_max = NEW_MAX;
ret = setrlimit(RLIMIT_NOFILE, &rl);
if(ret != 0) {
fprintf(stderr, "Unable to set open file limit.\n"
"(setrlimit(RLIMIT_NOFILE, &rl) failed)\n"
"(%d, %s)", errno, strerror(errno));
return 1;
}
ret = getrlimit(RLIMIT_NOFILE, &rl);
if(ret != 0) {
fprintf(stderr, "Unable to read new open file limit.\n"
"(getrlimit(RLIMIT_NOFILE, &rl) failed)\n"
"(%d, %s)", errno, strerror(errno));
return 1;
}
if(rl.rlim_cur < NEW_MAX) {
fprintf(stderr, "Failed to set new open file limit.\n"
"Limit is %d, expected %d\n",
rl.rlim_cur, NEW_MAX);
return 1;
}
if(setgid(GID) != 0) {
fprintf(stderr, "setgid failed (%d, %s)\n", errno, strerror(errno));
return 1;
}
if(setuid(UID) != 0) {
fprintf(stderr, "setuid failed (%d, %s)\n", errno, strerror(errno));
return 1;
}
ret = execv(brgv[0], brgv);
fprintf(stderr, "execl returned, failure\n"
"returned %d, errno is %d (%s)\n",
ret, errno, strerror(errno));
return 1;
}

View File

@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -459,7 +459,10 @@ typedef CURLcode (*curl_ssl_ctx_callback)(CURL *curl, /* easy handle */
void *userptr);
typedef enum {
CURLPROXY_HTTP = 0, /* added in 7.10 */
CURLPROXY_HTTP = 0, /* added in 7.10, new in 7.19.4 default is to use
CONNECT HTTP/1.1 */
CURLPROXY_HTTP_1_0 = 1, /* added in 7.19.4, force to use CONNECT
HTTP/1.0 */
CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already
in 7.10 */
CURLPROXY_SOCKS5 = 5, /* added in 7.10 */
@@ -474,8 +477,9 @@ typedef enum {
#define CURLAUTH_DIGEST (1<<1) /* Digest */
#define CURLAUTH_GSSNEGOTIATE (1<<2) /* GSS-Negotiate */
#define CURLAUTH_NTLM (1<<3) /* NTLM */
#define CURLAUTH_ANY ~0 /* all types set */
#define CURLAUTH_ANYSAFE (~CURLAUTH_BASIC)
#define CURLAUTH_DIGEST_IE (1<<4) /* Digest with IE flavour */
#define CURLAUTH_ANY (~CURLAUTH_DIGEST_IE) /* all fine types set */
#define CURLAUTH_ANYSAFE (~(CURLAUTH_BASIC|CURLAUTH_DIGEST_IE))
#define CURLSSH_AUTH_ANY ~0 /* all types supported by the server */
#define CURLSSH_AUTH_NONE 0 /* none allowed, silly but complete */
@@ -526,6 +530,17 @@ typedef enum {
CURLFTPAUTH_LAST /* not an option, never use */
} curl_ftpauth;
/* parameter for the CURLOPT_FTP_CREATE_MISSING_DIRS option */
typedef enum {
CURLFTP_CREATE_DIR_NONE, /* do NOT create missing dirs! */
CURLFTP_CREATE_DIR, /* (FTP/SFTP) if CWD fails, try MKD and then CWD
again if MKD succeeded, for SFTP this does
similar magic */
CURLFTP_CREATE_DIR_RETRY, /* (FTP only) if CWD fails, try MKD and then CWD
again even if MKD failed! */
CURLFTP_CREATE_DIR_LAST /* not an option, never use */
} curl_ftpcreatedir;
/* parameter for the CURLOPT_FTP_FILEMETHOD option */
typedef enum {
CURLFTPMETHOD_DEFAULT, /* let libcurl pick */
@@ -535,6 +550,21 @@ typedef enum {
CURLFTPMETHOD_LAST /* not an option, never use */
} curl_ftpmethod;
/* CURLPROTO_ defines are for the CURLOPT_*PROTOCOLS options */
#define CURLPROTO_HTTP (1<<0)
#define CURLPROTO_HTTPS (1<<1)
#define CURLPROTO_FTP (1<<2)
#define CURLPROTO_FTPS (1<<3)
#define CURLPROTO_SCP (1<<4)
#define CURLPROTO_SFTP (1<<5)
#define CURLPROTO_TELNET (1<<6)
#define CURLPROTO_LDAP (1<<7)
#define CURLPROTO_LDAPS (1<<8)
#define CURLPROTO_DICT (1<<9)
#define CURLPROTO_FILE (1<<10)
#define CURLPROTO_TFTP (1<<11)
#define CURLPROTO_ALL (~0) /* enable everything */
/* long may be 32 or 64 bits, but we should never depend on anything else
but 32 */
#define CURLOPTTYPE_LONG 0
@@ -867,7 +897,7 @@ typedef enum {
/* DNS cache timeout */
CINIT(DNS_CACHE_TIMEOUT, LONG, 92),
/* send linked-list of pre-transfer QUOTE commands (Wesley Laxton)*/
/* send linked-list of pre-transfer QUOTE commands */
CINIT(PREQUOTE, OBJECTPOINT, 93),
/* set the debug function */
@@ -932,7 +962,10 @@ typedef enum {
argument */
CINIT(SSL_CTX_DATA, OBJECTPOINT, 109),
/* FTP Option that causes missing dirs to be created on the remote server */
/* FTP Option that causes missing dirs to be created on the remote server.
In 7.19.4 we introduced the convenience enums for this option using the
CURLFTP_CREATE_DIR prefix.
*/
CINIT(FTP_CREATE_MISSING_DIRS, LONG, 110),
/* Set this to a bitmask value to enable the particular authentications
@@ -1149,6 +1182,36 @@ typedef enum {
CINIT(PROXYUSERNAME, OBJECTPOINT, 175),
CINIT(PROXYPASSWORD, OBJECTPOINT, 176),
/* Comma separated list of hostnames defining no-proxy zones. These should
match both hostnames directly, and hostnames within a domain. For
example, local.com will match local.com and www.local.com, but NOT
notlocal.com or www.notlocal.com. For compatibility with other
implementations of this, .local.com will be considered to be the same as
local.com. A single * is the only valid wildcard, and effectively
disables the use of proxy. */
CINIT(NOPROXY, OBJECTPOINT, 177),
/* block size for TFTP transfers */
CINIT(TFTP_BLKSIZE, LONG, 178),
/* Socks Service */
CINIT(SOCKS5_GSSAPI_SERVICE, LONG, 179),
/* Socks Service */
CINIT(SOCKS5_GSSAPI_NEC, LONG, 180),
/* set the bitmask for the protocols that are allowed to be used for the
transfer, which thus helps the app which takes URLs from users or other
external inputs and want to restrict what protocol(s) to deal
with. Defaults to CURLPROTO_ALL. */
CINIT(PROTOCOLS, LONG, 181),
/* set the bitmask for the protocols that libcurl is allowed to follow to,
as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs
to be set in both bitmasks to be allowed to get redirected to. Defaults
to all protocols except FILE and SCP. */
CINIT(REDIR_PROTOCOLS, LONG, 182),
CURLOPT_LASTENTRY /* the last unused */
} CURLoption;
@@ -1570,9 +1633,10 @@ typedef enum {
CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32,
CURLINFO_APPCONNECT_TIME = CURLINFO_DOUBLE + 33,
CURLINFO_CERTINFO = CURLINFO_SLIST + 34,
CURLINFO_CONDITION_UNMET = CURLINFO_LONG + 35,
/* Fill in new entries below here! */
CURLINFO_LASTONE = 34
CURLINFO_LASTONE = 35
} CURLINFO;
/* CURLINFO_RESPONSE_CODE is the new name for the option previously known as

View File

@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -438,6 +438,32 @@
# endif
# endif
/* ===================================== */
/* SunPro Compilers */
/* ===================================== */
#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
#include <sys/types.h>
#include <stdint.h>
# define CURL_TYPEOF_CURL_OFF_T off_t
# define CURL_SIZEOF_CURL_OFF_T 8
# if defined(__amd64) || defined(__sparcv9)
# define CURL_SIZEOF_LONG 8
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_FORMAT_OFF_T "%ld"
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# else
# define CURL_SIZEOF_LONG 4
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_FORMAT_OFF_T "%lld"
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# endif
/* ===================================== */
/* KEEP MSVC THE PENULTIMATE ENTRY */
/* ===================================== */
@@ -468,7 +494,7 @@
/* ===================================== */
#elif defined(__GNUC__)
# if defined(__i386__)
# if defined(__i386__) || defined(__ppc__)
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
@@ -477,7 +503,7 @@
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# elif defined(__x86_64__)
# elif defined(__x86_64__) || defined(__ppc64__)
# define CURL_SIZEOF_LONG 8
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"

View File

@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -27,17 +27,17 @@
a script at release-time. This was made its own header file in 7.11.2 */
/* This is the global package copyright */
#define LIBCURL_COPYRIGHT "1996 - 2008 Daniel Stenberg, <daniel@haxx.se>."
#define LIBCURL_COPYRIGHT "1996 - 2009 Daniel Stenberg, <daniel@haxx.se>."
/* This is the version number of the libcurl package from which this header
file origins: */
#define LIBCURL_VERSION "7.19.3-CVS"
#define LIBCURL_VERSION "7.19.4-CVS"
/* The numeric version number is also available "in parts" by using these
defines: */
#define LIBCURL_VERSION_MAJOR 7
#define LIBCURL_VERSION_MINOR 19
#define LIBCURL_VERSION_PATCH 3
#define LIBCURL_VERSION_PATCH 4
/* This is the numeric version of the libcurl version number, meant for easier
parsing and comparions by programs. The LIBCURL_VERSION_NUM define will
@@ -54,7 +54,7 @@
and it is always a greater number in a more recent release. It makes
comparisons with greater than and less than work.
*/
#define LIBCURL_VERSION_NUM 0x071303
#define LIBCURL_VERSION_NUM 0x071304
/*
* This is the date and time when the full source package was created. The

View File

@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -201,6 +201,7 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_slist,
(option) == CURLOPT_PROXYUSERPWD || \
(option) == CURLOPT_PROXYUSERNAME || \
(option) == CURLOPT_PROXYPASSWORD || \
(option) == CURLOPT_NOPROXY || \
(option) == CURLOPT_ENCODING || \
(option) == CURLOPT_REFERER || \
(option) == CURLOPT_USERAGENT || \

View File

@@ -7,6 +7,6 @@ Makefile
config.h
stamp-*
getdate.c
curllib.dsp
curllib.vcproj
libcurl.dsp
libcurl.vcproj
*.dist

View File

@@ -8,7 +8,7 @@ TARGETS = libcurl_wc.dll libcurl_wc_imp.lib libcurl_wc.lib
CC = wcc386
CFLAGS = -3r -mf -d3 -hc -zff -zgf -zq -zm -zc -s -fr=con -w2 -fpi -oilrtfm -bt=nt &
CFLAGS = -3s -mf -d3 -hc -zff -zgf -zq -zm -zc -s -fr=con -w2 -fpi -oilrtfm -bt=nt &
-bd -d+ -dWIN32 -dCURL_CA_BUNDLE=getenv("CURL_CA_BUNDLE") &
-dBUILDING_LIBCURL -dHAVE_SPNEGO=1 -dENABLE_IPV6 &
-dDEBUG=1 -dCURLDEBUG -d_WIN32_WINNT=0x0501 -dWINBERAPI=__declspec(cdecl) &
@@ -20,6 +20,7 @@ CFLAGS = -3r -mf -d3 -hc -zff -zgf -zq -zm -zc -s -fr=con -w2 -fpi -oilrtfm -bt=
ZLIB_ROOT = ..\..\..\zlib-1.2.3
USE_ZLIB = 0
USE_ARES = 0
USE_WATT32 = 0
!ifeq USE_ZLIB 1
CFLAGS += -dHAVE_ZLIB_H -dHAVE_LIBZ -I$(ZLIB_ROOT)
@@ -29,6 +30,10 @@ CFLAGS += -dHAVE_ZLIB_H -dHAVE_LIBZ -I$(ZLIB_ROOT)
CFLAGS += -dUSE_ARES -I..\ares
!endif
!ifeq USE_WATT32 1
CFLAGS += -dUSE_WATT32 -I$(%watt_root)\inc
!endif
OBJ_BASE = WC_Win32.obj
C_ARG = $(OBJ_BASE)\wcc386.arg
LINK_ARG = $(OBJ_BASE)\dyn\wlink.arg
@@ -121,7 +126,12 @@ $(LINK_ARG): $(__MAKEFILES__)
@%append $^@ file { $(OBJS_DYN) }
@%append $^@ option quiet, map, caseexact, eliminate, implib=libcurl_wc_imp.lib,
@%append $^@ res=$(RESOURCE) libpath $(%watcom)\lib386;$(%watcom)\lib386\nt
@%append $^@ library clib3r.lib, wldap32.lib, ws2_32.lib
@%append $^@ library clib3s.lib, wldap32.lib
!ifeq USE_WATT32 1
@%append $^@ library $(%watt_root)\lib\wattcpw_imp.lib
!else
@%append $^@ library ws2_32.lib
!endif
!ifeq USE_ZLIB 1
@%append $^@ library $(ZLIB_ROOT)\zlib.lib
!endif
@@ -141,9 +151,9 @@ $(OBJ_DIR)\file.obj: file.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h splay.h progress.h sendf.h &
escape.h file.h speedcheck.h getinfo.h transfer.h url.h memory.h &
parsedate.h ..\include\curl\mprintf.h memdebug.h
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h &
progress.h sendf.h escape.h file.h speedcheck.h getinfo.h transfer.h &
url.h memory.h parsedate.h ..\include\curl\mprintf.h memdebug.h
$(OBJ_DIR)\timeval.obj: timeval.c timeval.h setup.h config-win32.h &
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h
$(OBJ_DIR)\base64.obj: base64.c setup.h config-win32.h ..\include\curl\curlbuild.h &
@@ -151,111 +161,114 @@ $(OBJ_DIR)\base64.obj: base64.c setup.h config-win32.h ..\include\curl\curlbuild
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h urldata.h cookie.h ..\include\curl\curl.h &
formdata.h timeval.h http_chunks.h hostip.h hash.h llist.h splay.h &
easyif.h curl_base64.h memory.h memdebug.h
formdata.h timeval.h http_chunks.h hostip.h hash.h llist.h &
curl_addrinfo.h splay.h easyif.h curl_base64.h memory.h memdebug.h
$(OBJ_DIR)\hostip.obj: hostip.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h splay.h sendf.h share.h &
strerror.h url.h inet_ntop.h ..\include\curl\mprintf.h memory.h &
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
share.h strerror.h url.h inet_ntop.h ..\include\curl\mprintf.h memory.h &
memdebug.h
$(OBJ_DIR)\progress.obj: progress.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h splay.h sendf.h progress.h &
..\include\curl\mprintf.h
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
progress.h ..\include\curl\mprintf.h
$(OBJ_DIR)\formdata.obj: formdata.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
..\include\curl\curlver.h ..\include\curl\curlrules.h &
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h &
llist.h splay.h easyif.h strequal.h memory.h ..\include\curl\mprintf.h &
memdebug.h
llist.h curl_addrinfo.h splay.h easyif.h strequal.h memory.h &
..\include\curl\mprintf.h memdebug.h
$(OBJ_DIR)\cookie.obj: cookie.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h ..\include\curl\mprintf.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h urldata.h cookie.h ..\include\curl\curl.h &
formdata.h timeval.h http_chunks.h hostip.h hash.h llist.h splay.h &
strequal.h strtok.h sendf.h memory.h share.h strtoofft.h memdebug.h
formdata.h timeval.h http_chunks.h hostip.h hash.h llist.h &
curl_addrinfo.h splay.h strequal.h strtok.h sendf.h memory.h share.h &
strtoofft.h rawstr.h memdebug.h
$(OBJ_DIR)\http.obj: http.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h splay.h transfer.h sendf.h &
easyif.h progress.h curl_base64.h strequal.h sslgen.h http_digest.h &
http_ntlm.h http_negotiate.h url.h share.h http.h memory.h select.h &
parsedate.h strtoofft.h multiif.h ..\include\curl\mprintf.h memdebug.h
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h &
transfer.h sendf.h easyif.h progress.h curl_base64.h strequal.h &
sslgen.h http_digest.h http_ntlm.h http_negotiate.h url.h share.h &
http.h memory.h select.h parsedate.h strtoofft.h multiif.h rawstr.h &
..\include\curl\mprintf.h memdebug.h
$(OBJ_DIR)\sendf.obj: sendf.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
..\include\curl\curlver.h ..\include\curl\curlrules.h &
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h &
llist.h splay.h sendf.h connect.h sslgen.h ssh.h multiif.h &
..\include\curl\mprintf.h memory.h strerror.h easyif.h memdebug.h
llist.h curl_addrinfo.h splay.h sendf.h connect.h sslgen.h ssh.h &
multiif.h ..\include\curl\mprintf.h memory.h strerror.h easyif.h &
memdebug.h
$(OBJ_DIR)\ftp.obj: ftp.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
..\include\curl\curlver.h ..\include\curl\curlrules.h &
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h &
llist.h splay.h sendf.h easyif.h if2ip.h progress.h transfer.h escape.h &
http.h socks.h ftp.h strtoofft.h strequal.h sslgen.h connect.h &
strerror.h memory.h inet_ntop.h select.h parsedate.h sockaddr.h &
multiif.h url.h ..\include\curl\mprintf.h memdebug.h
llist.h curl_addrinfo.h splay.h sendf.h easyif.h if2ip.h progress.h &
transfer.h escape.h http.h socks.h ftp.h strtoofft.h strequal.h &
sslgen.h connect.h strerror.h inet_ntop.h inet_pton.h select.h &
parsedate.h sockaddr.h multiif.h url.h ..\include\curl\mprintf.h &
memory.h memdebug.h
$(OBJ_DIR)\url.obj: url.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h splay.h netrc.h sslgen.h &
transfer.h sendf.h progress.h strequal.h strerror.h escape.h strtok.h &
share.h content_encoding.h http_digest.h http_negotiate.h select.h &
multiif.h easyif.h speedcheck.h ftp.h dict.h telnet.h tftp.h http.h &
file.h curl_ldap.h ssh.h url.h connect.h inet_ntop.h http_ntlm.h &
socks.h ..\include\curl\mprintf.h memory.h memdebug.h
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h netrc.h &
sslgen.h transfer.h sendf.h progress.h strequal.h strerror.h escape.h &
strtok.h share.h content_encoding.h http_digest.h http_negotiate.h &
select.h multiif.h easyif.h speedcheck.h rawstr.h ftp.h dict.h telnet.h &
tftp.h http.h file.h curl_ldap.h ssh.h url.h connect.h inet_ntop.h &
http_ntlm.h socks.h ..\include\curl\mprintf.h memory.h memdebug.h
$(OBJ_DIR)\dict.obj: dict.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h splay.h transfer.h sendf.h &
progress.h strequal.h dict.h ..\include\curl\mprintf.h memdebug.h
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h &
transfer.h sendf.h progress.h strequal.h dict.h rawstr.h &
..\include\curl\mprintf.h memdebug.h
$(OBJ_DIR)\if2ip.obj: if2ip.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h if2ip.h
..\include\curl\curlrules.h setup_once.h inet_ntop.h strequal.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h if2ip.h &
..\include\curl\mprintf.h memory.h memdebug.h
$(OBJ_DIR)\speedcheck.obj: speedcheck.c setup.h config-win32.h &
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h urldata.h cookie.h &
formdata.h timeval.h http_chunks.h hostip.h hash.h llist.h splay.h &
sendf.h multiif.h speedcheck.h
formdata.h timeval.h http_chunks.h hostip.h hash.h llist.h &
curl_addrinfo.h splay.h sendf.h multiif.h speedcheck.h
$(OBJ_DIR)\ldap.obj: ldap.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h splay.h sendf.h escape.h &
transfer.h strequal.h strtok.h curl_ldap.h memory.h curl_base64.h &
..\include\curl\mprintf.h memdebug.h
..\include\curl\curlrules.h setup_once.h
$(OBJ_DIR)\ssluse.obj: ssluse.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h splay.h sendf.h url.h inet_pton.h &
ssluse.h connect.h strequal.h select.h sslgen.h &
..\include\curl\mprintf.h
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
url.h inet_pton.h ssluse.h connect.h strequal.h select.h sslgen.h &
rawstr.h ..\include\curl\mprintf.h
$(OBJ_DIR)\version.obj: version.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
..\include\curl\curlver.h ..\include\curl\curlrules.h &
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h &
llist.h splay.h sslgen.h ..\include\curl\mprintf.h
llist.h curl_addrinfo.h splay.h sslgen.h ..\include\curl\mprintf.h
$(OBJ_DIR)\getenv.obj: getenv.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
..\include\curl\curlver.h ..\include\curl\curlrules.h &
@@ -266,7 +279,8 @@ $(OBJ_DIR)\escape.obj: escape.c setup.h config-win32.h ..\include\curl\curlbuild
..\include\curl\curlver.h ..\include\curl\curlrules.h &
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
memory.h urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h &
hash.h llist.h splay.h easyif.h ..\include\curl\mprintf.h memdebug.h
hash.h llist.h curl_addrinfo.h splay.h easyif.h &
..\include\curl\mprintf.h memdebug.h
$(OBJ_DIR)\mprintf.obj: mprintf.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h ..\include\curl\mprintf.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
@@ -277,31 +291,32 @@ $(OBJ_DIR)\telnet.obj: telnet.c setup.h config-win32.h ..\include\curl\curlbuild
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h splay.h transfer.h sendf.h &
telnet.h connect.h ..\include\curl\mprintf.h arpa_telnet.h memory.h &
select.h memdebug.h
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h &
transfer.h sendf.h telnet.h connect.h ..\include\curl\mprintf.h &
arpa_telnet.h memory.h select.h strequal.h rawstr.h memdebug.h
$(OBJ_DIR)\netrc.obj: netrc.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
..\include\curl\curlver.h ..\include\curl\curlrules.h &
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
netrc.h strequal.h strtok.h memory.h ..\include\curl\mprintf.h &
netrc.h strequal.h strtok.h memory.h rawstr.h ..\include\curl\mprintf.h &
memdebug.h
$(OBJ_DIR)\getinfo.obj: getinfo.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
..\include\curl\curlver.h ..\include\curl\curlrules.h &
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h &
llist.h splay.h getinfo.h memory.h sslgen.h connect.h memdebug.h
llist.h curl_addrinfo.h splay.h getinfo.h memory.h sslgen.h connect.h &
memdebug.h
$(OBJ_DIR)\transfer.obj: transfer.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h strtoofft.h strequal.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h urldata.h cookie.h &
formdata.h timeval.h http_chunks.h hostip.h hash.h llist.h splay.h &
netrc.h content_encoding.h transfer.h sendf.h speedcheck.h progress.h &
http.h url.h getinfo.h sslgen.h http_digest.h http_ntlm.h &
http_negotiate.h share.h memory.h select.h multiif.h easyif.h &
..\include\curl\mprintf.h memdebug.h
..\include\curl\multi.h ..\include\curl\curl.h rawstr.h urldata.h &
cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h llist.h &
curl_addrinfo.h splay.h netrc.h content_encoding.h transfer.h sendf.h &
speedcheck.h progress.h http.h url.h getinfo.h sslgen.h http_digest.h &
http_ntlm.h http_negotiate.h share.h memory.h select.h multiif.h &
easyif.h ..\include\curl\mprintf.h memdebug.h
$(OBJ_DIR)\strequal.obj: strequal.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h strequal.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
@@ -312,10 +327,10 @@ $(OBJ_DIR)\easy.obj: easy.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h urldata.h cookie.h &
formdata.h timeval.h http_chunks.h hostip.h hash.h llist.h splay.h &
transfer.h sslgen.h url.h getinfo.h share.h strdup.h memory.h &
progress.h easyif.h select.h sendf.h http_ntlm.h connect.h &
..\include\curl\mprintf.h memdebug.h
formdata.h timeval.h http_chunks.h hostip.h hash.h llist.h &
curl_addrinfo.h splay.h transfer.h sslgen.h url.h getinfo.h share.h &
strdup.h memory.h progress.h easyif.h select.h sendf.h http_ntlm.h &
connect.h ..\include\curl\mprintf.h memdebug.h
$(OBJ_DIR)\security.obj: security.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h
$(OBJ_DIR)\krb4.obj: krb4.c setup.h config-win32.h ..\include\curl\curlbuild.h &
@@ -327,13 +342,14 @@ $(OBJ_DIR)\memdebug.obj: memdebug.c setup.h config-win32.h ..\include\curl\curlb
..\include\curl\curlver.h ..\include\curl\curlrules.h &
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
..\include\curl\mprintf.h urldata.h cookie.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h splay.h memory.h memdebug.h
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h memory.h &
memdebug.h
$(OBJ_DIR)\http_chunks.obj: http_chunks.c setup.h config-win32.h &
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
urldata.h cookie.h ..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h splay.h sendf.h &
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
content_encoding.h http.h memory.h easyif.h ..\include\curl\mprintf.h &
memdebug.h
$(OBJ_DIR)\strtok.obj: strtok.c setup.h config-win32.h ..\include\curl\curlbuild.h &
@@ -343,26 +359,28 @@ $(OBJ_DIR)\connect.obj: connect.c setup.h config-win32.h ..\include\curl\curlbui
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h urldata.h cookie.h ..\include\curl\curl.h &
formdata.h timeval.h http_chunks.h hostip.h hash.h llist.h splay.h &
sendf.h if2ip.h strerror.h connect.h memory.h select.h url.h multiif.h &
sockaddr.h inet_ntop.h inet_pton.h sslgen.h memdebug.h
formdata.h timeval.h http_chunks.h hostip.h hash.h llist.h &
curl_addrinfo.h splay.h sendf.h if2ip.h strerror.h connect.h memory.h &
select.h url.h multiif.h sockaddr.h inet_ntop.h sslgen.h memdebug.h
$(OBJ_DIR)\llist.obj: llist.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h llist.h memory.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h memdebug.h
$(OBJ_DIR)\hash.obj: hash.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h hash.h llist.h memory.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h memdebug.h
..\include\curl\curlrules.h setup_once.h hash.h llist.h &
..\include\curl\mprintf.h ..\include\curl\curl.h &
..\include\curl\curlver.h ..\include\curl\curlrules.h &
..\include\curl\easy.h ..\include\curl\multi.h memory.h &
..\include\curl\curl.h memdebug.h
$(OBJ_DIR)\multi.obj: multi.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
..\include\curl\curlver.h ..\include\curl\curlrules.h &
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h &
llist.h splay.h transfer.h url.h connect.h progress.h memory.h easyif.h &
multiif.h sendf.h http.h memdebug.h
llist.h curl_addrinfo.h splay.h transfer.h url.h connect.h progress.h &
easyif.h multiif.h sendf.h http.h ..\include\curl\mprintf.h memory.h &
memdebug.h
$(OBJ_DIR)\content_encoding.obj: content_encoding.c setup.h config-win32.h &
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h
$(OBJ_DIR)\share.obj: share.c setup.h config-win32.h ..\include\curl\curlbuild.h &
@@ -370,15 +388,15 @@ $(OBJ_DIR)\share.obj: share.c setup.h config-win32.h ..\include\curl\curlbuild.h
..\include\curl\curlver.h ..\include\curl\curlrules.h &
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h &
llist.h splay.h share.h memory.h memdebug.h
llist.h curl_addrinfo.h splay.h share.h memory.h memdebug.h
$(OBJ_DIR)\http_digest.obj: http_digest.c setup.h config-win32.h &
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
urldata.h cookie.h ..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h splay.h sendf.h strequal.h &
curl_base64.h curl_md5.h http_digest.h strtok.h url.h memory.h easyif.h &
..\include\curl\mprintf.h memdebug.h
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
rawstr.h curl_base64.h curl_md5.h http_digest.h strtok.h url.h memory.h &
easyif.h ..\include\curl\mprintf.h memdebug.h
$(OBJ_DIR)\md5.obj: md5.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h curl_md5.h
$(OBJ_DIR)\http_negotiate.obj: http_negotiate.c setup.h config-win32.h &
@@ -388,8 +406,8 @@ $(OBJ_DIR)\http_ntlm.obj: http_ntlm.c setup.h config-win32.h &
urldata.h cookie.h ..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h splay.h easyif.h sendf.h &
strequal.h curl_base64.h http_ntlm.h url.h memory.h ssluse.h &
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h easyif.h &
sendf.h rawstr.h curl_base64.h http_ntlm.h url.h memory.h ssluse.h &
..\include\curl\mprintf.h memdebug.h
$(OBJ_DIR)\inet_pton.obj: inet_pton.c setup.h config-win32.h &
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
@@ -402,53 +420,54 @@ $(OBJ_DIR)\strerror.obj: strerror.c setup.h config-win32.h ..\include\curl\curlb
..\include\curl\curlver.h ..\include\curl\curlrules.h &
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
strerror.h urldata.h cookie.h formdata.h timeval.h http_chunks.h &
hostip.h hash.h llist.h splay.h ..\include\curl\mprintf.h
hostip.h hash.h llist.h curl_addrinfo.h splay.h &
..\include\curl\mprintf.h
$(OBJ_DIR)\hostares.obj: hostares.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h splay.h sendf.h share.h &
strerror.h url.h multiif.h connect.h select.h ..\include\curl\mprintf.h &
memory.h memdebug.h
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
share.h strerror.h url.h multiif.h inet_pton.h connect.h select.h &
..\include\curl\mprintf.h memory.h memdebug.h
$(OBJ_DIR)\hostasyn.obj: hostasyn.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h splay.h sendf.h share.h &
strerror.h url.h ..\include\curl\mprintf.h memory.h memdebug.h
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
share.h strerror.h url.h ..\include\curl\mprintf.h memory.h memdebug.h
$(OBJ_DIR)\hostip4.obj: hostip4.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h splay.h sendf.h share.h &
strerror.h url.h inet_pton.h ..\include\curl\mprintf.h memory.h &
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
share.h strerror.h url.h inet_pton.h ..\include\curl\mprintf.h memory.h &
memdebug.h
$(OBJ_DIR)\hostip6.obj: hostip6.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h splay.h sendf.h share.h &
strerror.h url.h inet_pton.h connect.h ..\include\curl\mprintf.h &
memory.h memdebug.h
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
share.h strerror.h url.h inet_pton.h connect.h &
..\include\curl\mprintf.h memory.h memdebug.h
$(OBJ_DIR)\hostsyn.obj: hostsyn.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h splay.h sendf.h share.h &
strerror.h url.h ..\include\curl\mprintf.h memory.h memdebug.h
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
share.h strerror.h url.h ..\include\curl\mprintf.h memory.h memdebug.h
$(OBJ_DIR)\hostthre.obj: hostthre.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h splay.h sendf.h share.h &
strerror.h url.h multiif.h ..\include\curl\mprintf.h inet_ntop.h &
memory.h memdebug.h
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
share.h strerror.h url.h multiif.h inet_pton.h &
..\include\curl\mprintf.h inet_ntop.h memory.h memdebug.h
$(OBJ_DIR)\inet_ntop.obj: inet_ntop.c setup.h config-win32.h &
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
..\include\curl\mprintf.h ..\include\curl\curl.h &
@@ -458,13 +477,13 @@ $(OBJ_DIR)\parsedate.obj: parsedate.c setup.h config-win32.h &
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h
..\include\curl\multi.h ..\include\curl\curl.h rawstr.h parsedate.h
$(OBJ_DIR)\select.obj: select.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
..\include\curl\curlver.h ..\include\curl\curlrules.h &
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
urldata.h cookie.h formdata.h timeval.h http_chunks.h hostip.h hash.h &
llist.h splay.h connect.h select.h
llist.h curl_addrinfo.h splay.h connect.h select.h
$(OBJ_DIR)\gtls.obj: gtls.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h
$(OBJ_DIR)\sslgen.obj: sslgen.c setup.h config-win32.h ..\include\curl\curlbuild.h &
@@ -472,16 +491,17 @@ $(OBJ_DIR)\sslgen.obj: sslgen.c setup.h config-win32.h ..\include\curl\curlbuild
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h splay.h sslgen.h ssluse.h gtls.h &
nssg.h qssl.h sendf.h strequal.h url.h memory.h progress.h memdebug.h
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sslgen.h &
ssluse.h gtls.h nssg.h qssl.h sendf.h rawstr.h url.h memory.h &
progress.h memdebug.h
$(OBJ_DIR)\tftp.obj: tftp.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h urldata.h cookie.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h splay.h transfer.h sendf.h tftp.h &
progress.h connect.h strerror.h sockaddr.h url.h &
..\include\curl\mprintf.h memory.h select.h memdebug.h
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h &
transfer.h sendf.h tftp.h progress.h connect.h strerror.h sockaddr.h &
url.h ..\include\curl\mprintf.h memory.h select.h memdebug.h
$(OBJ_DIR)\splay.obj: splay.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h splay.h
$(OBJ_DIR)\strdup.obj: strdup.c setup.h config-win32.h ..\include\curl\curlbuild.h &
@@ -491,8 +511,8 @@ $(OBJ_DIR)\socks.obj: socks.c setup.h config-win32.h ..\include\curl\curlbuild.h
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h splay.h sendf.h strequal.h &
select.h connect.h socks.h memdebug.h
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
strequal.h select.h connect.h socks.h memdebug.h
$(OBJ_DIR)\ssh.obj: ssh.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h
$(OBJ_DIR)\nss.obj: nss.c setup.h config-win32.h ..\include\curl\curlbuild.h &
@@ -500,17 +520,16 @@ $(OBJ_DIR)\nss.obj: nss.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h formdata.h timeval.h &
http_chunks.h hostip.h hash.h llist.h splay.h sendf.h url.h connect.h &
strequal.h select.h sslgen.h ..\include\curl\mprintf.h
http_chunks.h hostip.h hash.h llist.h curl_addrinfo.h splay.h sendf.h &
url.h connect.h strequal.h select.h sslgen.h ..\include\curl\mprintf.h
$(OBJ_DIR)\qssl.obj: qssl.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h
$(OBJ_DIR)\rawstr.obj: rawstr.c setup.h config-win32.h ..\include\curl\curlbuild.h &
..\include\curl\curlrules.h setup_once.h ..\include\curl\curl.h &
..\include\curl\curlver.h ..\include\curl\curlrules.h &
..\include\curl\easy.h ..\include\curl\multi.h ..\include\curl\curl.h &
strerror.h urldata.h cookie.h formdata.h timeval.h http_chunks.h &
hostip.h hash.h llist.h splay.h ..\include\curl\mprintf.h
$(OBJ_DIR)\curl_addrinfo.o: curl_addrinfo.c setup.h config-win32.h &
..\include\curl\curlrules.h setup_once.h rawstr.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &
..\include\curl\multi.h ..\include\curl\curl.h
$(OBJ_DIR)\curl_addrinfo.obj: curl_addrinfo.c setup.h config-win32.h &
..\include\curl\curlbuild.h ..\include\curl\curlrules.h setup_once.h &
..\include\curl\curl.h ..\include\curl\curlver.h &
..\include\curl\curlrules.h ..\include\curl\easy.h &

View File

@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -22,16 +22,16 @@
###########################################################################
AUTOMAKE_OPTIONS = foreign nostdinc
DSP = curllib.dsp
VCPROJ = curllib.vcproj
DSP = libcurl.dsp
VCPROJ = libcurl.vcproj
DOCS = README.encoding README.memoryleak README.ares README.curlx \
README.hostip README.multi_socket README.httpauth README.pipelining \
README.NSS README.curl_off_t
EXTRA_DIST = Makefile.b32 Makefile.m32 Makefile.vc6 Makefile.riscos $(DSP) \
curllib.dsw config-win32.h config-win32ce.h config-riscos.h config-mac.h \
config.h.in makefile.dj config.dos libcurl.framework.make libcurl.plist \
libcurl.dsw config-win32.h config-win32ce.h config-riscos.h config-mac.h \
config.h.in makefile.dj config.dos libcurl.plist \
libcurl.rc config-amigaos.h amigaos.c amigaos.h makefile.amiga \
Makefile.netware nwlib.c nwos.c libcurl.imp msvcproj.head msvcproj.foot \
config-win32ce.h config-os400.h setup-os400.h config-symbian.h \

View File

@@ -9,7 +9,8 @@ CSOURCES = file.c timeval.c base64.c hostip.c progress.c formdata.c \
http_negotiate.c http_ntlm.c inet_pton.c strtoofft.c strerror.c \
hostares.c hostasyn.c hostip4.c hostip6.c hostsyn.c hostthre.c \
inet_ntop.c parsedate.c select.c gtls.c sslgen.c tftp.c splay.c \
strdup.c socks.c ssh.c nss.c qssl.c rawstr.c curl_addrinfo.c
strdup.c socks.c ssh.c nss.c qssl.c rawstr.c curl_addrinfo.c \
socks_gssapi.c socks_sspi.c curl_sspi.c
HHEADERS = arpa_telnet.h netrc.h file.h timeval.h qssl.h hostip.h \
progress.h formdata.h cookie.h http.h sendf.h ftp.h url.h dict.h \
@@ -20,4 +21,4 @@ HHEADERS = arpa_telnet.h netrc.h file.h timeval.h qssl.h hostip.h \
strtoofft.h strerror.h inet_ntop.h curlx.h memory.h setup.h \
transfer.h select.h easyif.h multiif.h parsedate.h sslgen.h gtls.h \
tftp.h sockaddr.h splay.h strdup.h setup_once.h socks.h ssh.h nssg.h \
curl_base64.h rawstr.h curl_addrinfo.h
curl_base64.h rawstr.h curl_addrinfo.h curl_sspi.h

View File

@@ -426,6 +426,9 @@ else
@echo $(DL)#define HAVE_TERMIOS_H 1$(DL) >> $@
@echo $(DL)#define HAVE_AF_INET6 1$(DL) >> $@
@echo $(DL)#define HAVE_PF_INET6 1$(DL) >> $@
@echo $(DL)#define HAVE_FREEADDRINFO 1$(DL) >> $@
@echo $(DL)#define HAVE_GETADDRINFO 1$(DL) >> $@
@echo $(DL)#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1$(DL) >> $@
@echo $(DL)#define HAVE_STRUCT_IN6_ADDR 1$(DL) >> $@
@echo $(DL)#define HAVE_STRUCT_SOCKADDR_IN6 1$(DL) >> $@
@echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@
@@ -452,8 +455,6 @@ else
@echo $(DL)#define _LARGEFILE 1$(DL) >> $@
ifdef ENABLE_IPV6
@echo $(DL)#define ENABLE_IPV6 1$(DL) >> $@
@echo $(DL)#define HAVE_FREEADDRINFO 1$(DL) >> $@
@echo $(DL)#define HAVE_GETADDRINFO 1$(DL) >> $@
endif
endif
@echo $(DL)#define USE_MANUAL 1$(DL) >> $@

View File

@@ -1,5 +1,25 @@
#############################################################
# $Id: Makefile.vc6,v 1.19 2004/11/14 13:48:15 giva Exp $
#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 1999 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://curl.haxx.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
# $Id: Makefile.am,v 1.139 2008-11-03 08:50:58 bagder Exp $
###########################################################################
#
# Makefile for building libcurl with MSVC6
#
@@ -430,6 +450,7 @@ X_OBJS= \
$(DIROBJ)\content_encoding.obj \
$(DIROBJ)\cookie.obj \
$(DIROBJ)\curl_addrinfo.obj \
$(DIROBJ)\curl_sspi.obj \
$(DIROBJ)\dict.obj \
$(DIROBJ)\easy.obj \
$(DIROBJ)\escape.obj \
@@ -469,8 +490,10 @@ X_OBJS= \
$(DIROBJ)\sendf.obj \
$(DIROBJ)\share.obj \
$(DIROBJ)\socks.obj \
$(DIROBJ)\socks_sspi.obj \
$(DIROBJ)\speedcheck.obj \
$(DIROBJ)\splay.obj \
$(DIROBJ)\ssh.obj \
$(DIROBJ)\sslgen.obj \
$(DIROBJ)\ssluse.obj \
$(DIROBJ)\strequal.obj \

View File

@@ -54,12 +54,9 @@ BOOL amiga_init()
return FALSE;
}
if(SocketBaseTags(
SBTM_SETVAL(SBTC_ERRNOPTR(sizeof(errno))), (ULONG) &errno,
// SBTM_SETVAL(SBTC_HERRNOLONGPTR), (ULONG) &h_errno,
if(SocketBaseTags(SBTM_SETVAL(SBTC_ERRNOPTR(sizeof(errno))), (ULONG) &errno,
SBTM_SETVAL(SBTC_LOGTAGPTR), (ULONG) "cURL",
TAG_DONE)) {
__request("SocketBaseTags ERROR");
return FALSE;
}

View File

@@ -42,6 +42,9 @@
/* Define if you want to enable IPv6 support */
#define ENABLE_IPV6
/* Define if struct sockaddr_in6 has the sin6_scope_id member */
#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
/* Define this to 'int' if ssize_t is not an available typedefed type */
#undef ssize_t
@@ -82,8 +85,8 @@
#define HAVE_FCNTL_H
/* Define if getaddrinfo exists and works */
/* OS400 has no ASCII version of this procedure. */
#undef HAVE_GETADDRINFO
/* OS400 has no ASCII version of this procedure: wrapped in setup-os400.h. */
#define HAVE_GETADDRINFO
/* Define if you have the `geteuid' function. */
#define HAVE_GETEUID
@@ -284,7 +287,7 @@
#undef HAVE_STRLCPY
/* Define if you have the <stropts.h> header file. */
#define HAVE_STROPTS_H
#undef HAVE_STROPTS_H
/* Define if you have the `strstr' function. */
#define HAVE_STRSTR
@@ -404,15 +407,21 @@
/* Define if you have a working ioctl SIOCGIFADDR function. */
#define HAVE_IOCTL_SIOCGIFADDR
/* to disable LDAP */
/* To disable LDAP */
#undef CURL_DISABLE_LDAP
/* To avoid external use of library hidden symbols */
#define CURL_HIDDEN_SYMBOLS
/* External symbols need no special keyword. */
#define CURL_EXTERN_SYMBOL
/* Define if you have the ldap_url_parse procedure. */
/* #define HAVE_LDAP_URL_PARSE */ /* Disabled because of an IBM bug. */
/* Define if you have the getnameinfo function. */
/* OS400 has no ASCII version of this procedure. */
#undef HAVE_GETNAMEINFO
/* OS400 has no ASCII version of this procedure: wrapped in setup-os400.h. */
#define HAVE_GETNAMEINFO
/* Define to the type qualifier of arg 1 for getnameinfo. */
#define GETNAMEINFO_QUAL_ARG1 const

View File

@@ -38,6 +38,9 @@
/* Define if you want to enable IPv6 support */
#undef ENABLE_IPV6
/* Define if struct sockaddr_in6 has the sin6_scope_id member */
#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
/* Define this to 'int' if ssize_t is not an available typedefed type */
#undef ssize_t

View File

@@ -66,6 +66,9 @@
/* Define if you want to enable IPv6 support */
#define ENABLE_IPV6 1
/* Define if struct sockaddr_in6 has the sin6_scope_id member */
#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
/* Define to the type qualifier of arg 1 for getnameinfo. */
#define GETNAMEINFO_QUAL_ARG1 const

View File

@@ -62,6 +62,9 @@
/* Define if you want to enable IPv6 support */
/* #undef ENABLE_IPV6 */
/* Define if struct sockaddr_in6 has the sin6_scope_id member */
/* #undef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID */
/* Define to the type of arg 1 for getnameinfo. */
/* #undef GETNAMEINFO_TYPE_ARG1 */

View File

@@ -343,6 +343,30 @@
/* Define this if you have struct timeval */
#define HAVE_STRUCT_TIMEVAL 1
/* ---------------------------------------------------------------- */
/* Watt-32 tcp/ip SPECIFIC */
/* ---------------------------------------------------------------- */
#ifdef USE_WATT32
#include <tcp.h>
#undef byte
#undef word
#undef USE_WINSOCK
#undef HAVE_WINSOCK_H
#undef HAVE_WINSOCK2_H
#undef HAVE_WS2TCPIP_H
#define HAVE_GETADDRINFO
#define HAVE_GETNAMEINFO
#define HAVE_SYS_IOCTL_H
#define HAVE_SYS_SOCKET_H
#define HAVE_NETINET_IN_H
#define HAVE_NETDB_H
#define HAVE_ARPA_INET_H
#define HAVE_FREEADDRINFO
#define SOCKET int
#endif
/* ---------------------------------------------------------------- */
/* COMPILER SPECIFIC */
/* ---------------------------------------------------------------- */
@@ -379,22 +403,39 @@
# endif
#endif
/* VS2008 does not support Windows build targets prior to WinXP, */
/* so, if no build target has been defined we will target WinXP. */
/* Officially, Microsoft's Windows SDK versions 6.X do not support Windows
2000 as a supported build target. VS2008 default installations provide an
embedded Windows SDK v6.0A along with the claim that Windows 2000 is a
valid build target for VS2008. Popular belief is that binaries built using
Windows SDK versions 6.X and Windows 2000 as a build target are functional */
#if defined(_MSC_VER) && (_MSC_VER >= 1500)
# define VS2008_MINIMUM_TARGET 0x0500
#endif
/* When no build target is specified VS2008 default build target is Windows
Vista, which leaves out even Winsows XP. If no build target has been given
for VS2008 we will target the minimum Officially supported build target,
which happens to be Windows XP. */
#if defined(_MSC_VER) && (_MSC_VER >= 1500)
# define VS2008_DEFAULT_TARGET 0x0501
#endif
/* VS2008 default target settings and minimum build target check */
#if defined(_MSC_VER) && (_MSC_VER >= 1500)
# ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x0501
# define _WIN32_WINNT VS2008_DEFAULT_TARGET
# endif
# ifndef WINVER
# define WINVER 0x0501
# define WINVER VS2008_DEFAULT_TARGET
# endif
# if (_WIN32_WINNT < 0x0501) || (WINVER < 0x0501)
# error VS2008 does not support Windows build targets prior to WinXP
# if (_WIN32_WINNT < VS2008_MINIMUM_TARGET) || (WINVER < VS2008_MINIMUM_TARGET)
# error VS2008 does not support Windows build targets prior to Windows 2000
# endif
#endif
/* Availability of freeaddrinfo, getaddrinfo and getnameinfo functions is quite */
/* convoluted, compiler dependant and in some cases even build target dependat. */
/* Availability of freeaddrinfo, getaddrinfo and getnameinfo functions is
quite convoluted, compiler dependant and in some cases even build target
dependant. */
#if defined(HAVE_WS2TCPIP_H)
# if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
# define HAVE_FREEADDRINFO 1

View File

@@ -323,6 +323,9 @@
/* Define this if you have struct timeval */
#define HAVE_STRUCT_TIMEVAL 1
/* Define this if struct sockaddr_in6 has the sin6_scope_id member */
#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
/* ---------------------------------------------------------------- */
/* COMPILER SPECIFIC */
/* ---------------------------------------------------------------- */

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -23,8 +23,6 @@
#include "setup.h"
#ifndef WIN32
/* headers for non-win32 */
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
@@ -56,8 +54,8 @@
#include <arpa/inet.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h> /* required for free() prototype, without it, this crashes */
#endif /* on macos 68K */
#include <stdlib.h>
#endif
#if (defined(HAVE_IOCTL_FIONBIO) && defined(NETWARE))
#include <sys/filio.h>
@@ -71,8 +69,6 @@
#include <inet.h>
#endif
#endif /* !WIN32 */
#include <stdio.h>
#include <errno.h>
#include <string.h>
@@ -91,6 +87,7 @@
#include "multiif.h"
#include "sockaddr.h" /* required for Curl_sockaddr_storage */
#include "inet_ntop.h"
#include "inet_pton.h"
#include "sslgen.h" /* for Curl_ssl_check_cxn() */
/* The last #include file should be: */
@@ -281,12 +278,15 @@ static CURLcode bindlocal(struct connectdata *conn,
curl_socket_t sockfd, int af)
{
struct SessionHandle *data = conn->data;
struct sockaddr_in me;
struct Curl_sockaddr_storage sa;
struct sockaddr *sock = (struct sockaddr *)&sa; /* bind to this address */
socklen_t sizeof_sa = 0; /* size of the data sock points to */
struct sockaddr_in *si4 = (struct sockaddr_in *)&sa;
#ifdef ENABLE_IPV6
struct sockaddr_in6 me6;
struct sockaddr_in6 *si6 = (struct sockaddr_in6 *)&sa;
#endif
struct sockaddr *sock = NULL; /* bind to this address */
socklen_t socksize = 0; /* size of the data sock points to */
struct Curl_dns_entry *h=NULL;
unsigned short port = data->set.localport; /* use this port number, 0 for
"random" */
@@ -294,40 +294,64 @@ static CURLcode bindlocal(struct connectdata *conn,
int portnum = data->set.localportrange;
const char *dev = data->set.str[STRING_DEVICE];
int error;
char myhost[256] = "";
int done = 0; /* -1 for error, 1 for address found */
/*************************************************************
* Select device to bind socket to
*************************************************************/
if(dev && (strlen(dev)<255) ) {
char myhost[256] = "";
int rc;
bool was_iface = FALSE;
if ( !dev && !port )
/* no local kind of binding was requested */
return CURLE_OK;
memset(&sa, 0, sizeof(struct Curl_sockaddr_storage));
if(dev && (strlen(dev)<255) ) {
/* interface */
if(Curl_if2ip(af, dev, myhost, sizeof(myhost))) {
/*
* We now have the numerical IP address in the 'myhost' buffer
*/
rc = Curl_resolv(conn, myhost, 0, &h);
if(rc == CURLRESOLV_PENDING)
(void)Curl_wait_for_resolv(conn, &h);
infof(data, "Local Interface %s is ip %s using address family %i\n",
dev, myhost, af);
done = 1;
if(h) {
was_iface = TRUE;
#ifdef SO_BINDTODEVICE
/* I am not sure any other OSs than Linux that provide this feature, and
* at the least I cannot test. --Ben
*
* This feature allows one to tightly bind the local socket to a
* particular interface. This will force even requests to other local
* interfaces to go out the external interface.
*
*
* Only bind to the interface when specified as interface, not just as a
* hostname or ip address.
*/
if(setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE,
dev, strlen(dev)+1) != 0) {
error = SOCKERRNO;
infof(data, "SO_BINDTODEVICE %s failed with errno %d: %s;"
" will do regular bind\n",
dev, error, Curl_strerror(conn, error));
/* This is typically "errno 1, error: Operation not permitted" if
you're not running as root or another suitable privileged user */
}
#endif
}
if(!was_iface) {
else {
/*
* This was not an interface, resolve the name as a host name
* or IP number
*/
/*
*
* Temporarily force name resolution to use only the address type
* of the connection. The resolve functions should really be changed
* to take a type parameter instead.
*/
long ipver = data->set.ip_version;
int rc;
if (af == AF_INET)
data->set.ip_version = CURL_IPRESOLVE_V4;
#ifdef ENABLE_IPV6
@@ -342,92 +366,65 @@ static CURLcode bindlocal(struct connectdata *conn,
if(h) {
/* convert the resolved address, sizeof myhost >= INET_ADDRSTRLEN */
Curl_printable_address(h->addr, myhost, sizeof myhost);
Curl_printable_address(h->addr, myhost, sizeof(myhost));
infof(data, "Name '%s' family %i resolved to '%s' family %i\n",
dev, af, myhost, h->addr->ai_family);
Curl_resolv_unlock(data, h);
done = 1;
}
else {
/*
* provided dev was no interface (or interfaces are not supported
* e.g. solaris) no ip address and no domain we fail here
*/
done = -1;
}
}
if(!*myhost || !h) {
/* need to fix this
h=Curl_gethost(data,
getmyhost(*myhost,sizeof(myhost)),
hostent_buf,
sizeof(hostent_buf));
*/
if(done > 0) {
#ifdef ENABLE_IPV6
/* ipv6 address */
if((af == AF_INET6) &&
(Curl_inet_pton(AF_INET6, myhost, &si6->sin6_addr) > 0)) {
si6->sin6_family = AF_INET6;
si6->sin6_port = htons(port);
sizeof_sa = sizeof(struct sockaddr_in6);
}
else
#endif
/* ipv4 address */
if((af == AF_INET) &&
(Curl_inet_pton(AF_INET, myhost, &si4->sin_addr) > 0)) {
si4->sin_family = AF_INET;
si4->sin_port = htons(port);
sizeof_sa = sizeof(struct sockaddr_in);
}
}
if(done < 1) {
failf(data, "Couldn't bind to '%s'", dev);
if(h)
Curl_resolv_unlock(data, h);
return CURLE_INTERFACE_FAILED;
}
infof(data, "Bind local address to %s\n", myhost);
sock = h->addr->ai_addr;
socksize = h->addr->ai_addrlen;
#ifdef SO_BINDTODEVICE
/* I am not sure any other OSs than Linux that provide this feature, and
* at the least I cannot test. --Ben
*
* This feature allows one to tightly bind the local socket to a
* particular interface. This will force even requests to other local
* interfaces to go out the external interface.
*
*/
if(was_iface) {
/* Only bind to the interface when specified as interface, not just as a
* hostname or ip address.
*/
if(setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE,
dev, strlen(dev)+1) != 0) {
error = SOCKERRNO;
infof(data, "SO_BINDTODEVICE %s failed with errno %d: %s; will do regular bind\n",
dev, error, Curl_strerror(conn, error));
/* This is typically "errno 1, error: Operation not permitted" if
you're not running as root or another suitable privileged user */
}
}
#endif
}
else if(port) {
/* if a local port number is requested but no local IP, extract the
address from the socket */
if(af == AF_INET) {
memset(&me, 0, sizeof(me));
me.sin_family = AF_INET;
me.sin_addr.s_addr = INADDR_ANY;
sock = (struct sockaddr *)&me;
socksize = sizeof(me);
}
else {
/* no device was given, prepare sa to match af's needs */
#ifdef ENABLE_IPV6
else { /* AF_INET6 */
memset(&me6, 0, sizeof(me6));
me6.sin6_family = AF_INET6;
/* in6addr_any isn't always available and since me6 has just been
cleared, it's not strictly necessary to use it here */
/*me6.sin6_addr = in6addr_any;*/
sock = (struct sockaddr *)&me6;
socksize = sizeof(me6);
}
#endif
if ( af == AF_INET6 ) {
si6->sin6_family = AF_INET6;
si6->sin6_port = htons(port);
sizeof_sa = sizeof(struct sockaddr_in6);
}
else
/* no local kind of binding was requested */
return CURLE_OK;
#endif
if ( af == AF_INET ) {
si4->sin_family = AF_INET;
si4->sin_port = htons(port);
sizeof_sa = sizeof(struct sockaddr_in);
}
}
do {
/* Set port number to bind to, 0 makes the system pick one */
if(sock->sa_family == AF_INET)
me.sin_port = htons(port);
#ifdef ENABLE_IPV6
else
me6.sin6_port = htons(port);
#endif
if( bind(sockfd, sock, socksize) >= 0) {
if( bind(sockfd, sock, sizeof_sa) >= 0) {
/* we succeeded to bind */
struct Curl_sockaddr_storage add;
socklen_t size = sizeof(add);
@@ -436,26 +433,23 @@ static CURLcode bindlocal(struct connectdata *conn,
data->state.os_errno = error = SOCKERRNO;
failf(data, "getsockname() failed with errno %d: %s",
error, Curl_strerror(conn, error));
if(h)
Curl_resolv_unlock(data, h);
return CURLE_INTERFACE_FAILED;
}
/* We re-use/clobber the port variable here below */
if(((struct sockaddr *)&add)->sa_family == AF_INET)
port = ntohs(((struct sockaddr_in *)&add)->sin_port);
#ifdef ENABLE_IPV6
else
port = ntohs(((struct sockaddr_in6 *)&add)->sin6_port);
#endif
infof(data, "Local port: %d\n", port);
conn->bits.bound = TRUE;
if(h)
Curl_resolv_unlock(data, h);
return CURLE_OK;
}
if(--portnum > 0) {
infof(data, "Bind to local port %d failed, trying next\n", port);
port++; /* try next port */
/* We re-use/clobber the port variable here below */
if(sock->sa_family == AF_INET)
si4->sin_port = ntohs(port);
#ifdef ENABLE_IPV6
else
si6->sin6_port = ntohs(port);
#endif
}
else
break;
@@ -464,8 +458,6 @@ static CURLcode bindlocal(struct connectdata *conn,
data->state.os_errno = error = SOCKERRNO;
failf(data, "bind failed with errno %d: %s",
error, Curl_strerror(conn, error));
if(h)
Curl_resolv_unlock(data, h);
return CURLE_INTERFACE_FAILED;
}
@@ -773,7 +765,7 @@ singleipconnect(struct connectdata *conn,
/* no socket, no connection */
return CURL_SOCKET_BAD;
#ifdef ENABLE_IPV6
#if defined(ENABLE_IPV6) && defined(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID)
if (conn->scope && (addr.family == AF_INET6))
sa6->sin6_scope_id = conn->scope;
#endif

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -135,7 +135,8 @@ inflate_stream(struct connectdata *conn,
(void) inflateEnd(z); /* don't care about the return code */
if(inflateInit2(z, -MAX_WBITS) != Z_OK) {
return process_zlib_error(conn, z);
free(decomp);
return exit_zlib(z, &k->zlib_init, process_zlib_error(conn, z));
}
z->next_in = orig_in;
z->avail_in = nread;

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -439,7 +439,7 @@ Curl_cookie_add(struct SessionHandle *data,
reading the odd netscape cookies-file format here */
char *ptr;
char *firstptr;
char *tok_buf;
char *tok_buf=NULL;
int fields;
/* IE introduced HTTP-only cookies to prevent XSS attacks. Cookies
@@ -454,7 +454,6 @@ Curl_cookie_add(struct SessionHandle *data,
co->httponly = TRUE;
}
if(lineptr[0]=='#') {
/* don't even try the comments */
free(co);
@@ -878,7 +877,7 @@ void Curl_cookie_clearsess(struct CookieInfo *cookies)
{
struct Cookie *first, *curr, *next, *prev = NULL;
if(!cookies->cookies)
if(!cookies->cookies || !cookies->cookies)
return;
first = curr = prev = cookies->cookies;

119
lib/curl_sspi.c Normal file
View File

@@ -0,0 +1,119 @@
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at http://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
* $Id$
***************************************************************************/
#include "setup.h"
#ifdef USE_WINDOWS_SSPI
#include <curl/curl.h>
#include "curl_sspi.h"
#define _MPRINTF_REPLACE /* use our functions only */
#include <curl/mprintf.h>
#include "memory.h"
/* The last #include file should be: */
#include "memdebug.h"
/* Handle of security.dll or secur32.dll, depending on Windows version */
HMODULE s_hSecDll = NULL;
/* Pointer to SSPI dispatch table */
PSecurityFunctionTableA s_pSecFn = NULL;
/*
* Curl_sspi_global_init()
*
* This is used to load the Security Service Provider Interface (SSPI)
* dynamic link library portably across all Windows versions, without
* the need to directly link libcurl, nor the application using it, at
* build time.
*
* Once this function has been executed, Windows SSPI functions can be
* called through the Security Service Provider Interface dispatch table.
*/
CURLcode
Curl_sspi_global_init(void)
{
OSVERSIONINFO osver;
INIT_SECURITY_INTERFACE_A pInitSecurityInterface;
/* If security interface is not yet initialized try to do this */
if(s_hSecDll == NULL) {
/* Find out Windows version */
memset(&osver, 0, sizeof(osver));
osver.dwOSVersionInfoSize = sizeof(osver);
if(! GetVersionEx(&osver))
return CURLE_FAILED_INIT;
/* Security Service Provider Interface (SSPI) functions are located in
* security.dll on WinNT 4.0 and in secur32.dll on Win9x. Win2K and XP
* have both these DLLs (security.dll forwards calls to secur32.dll) */
/* Load SSPI dll into the address space of the calling process */
if(osver.dwPlatformId == VER_PLATFORM_WIN32_NT
&& osver.dwMajorVersion == 4)
s_hSecDll = LoadLibrary("security.dll");
else
s_hSecDll = LoadLibrary("secur32.dll");
if(! s_hSecDll)
return CURLE_FAILED_INIT;
/* Get address of the InitSecurityInterfaceA function from the SSPI dll */
pInitSecurityInterface = (INIT_SECURITY_INTERFACE_A)
GetProcAddress(s_hSecDll, "InitSecurityInterfaceA");
if(! pInitSecurityInterface)
return CURLE_FAILED_INIT;
/* Get pointer to Security Service Provider Interface dispatch table */
s_pSecFn = pInitSecurityInterface();
if(! s_pSecFn)
return CURLE_FAILED_INIT;
}
return CURLE_OK;
}
/*
* Curl_sspi_global_cleanup()
*
* This deinitializes the Security Service Provider Interface from libcurl.
*/
void
Curl_sspi_global_cleanup(void)
{
if(s_hSecDll) {
FreeLibrary(s_hSecDll);
s_hSecDll = NULL;
s_pSecFn = NULL;
}
}
#endif /* USE_WINDOWS_SSPI */

74
lib/curl_sspi.h Normal file
View File

@@ -0,0 +1,74 @@
#ifndef HEADER_CURL_SSPI_H
#define HEADER_CURL_SSPI_H
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at http://curl.haxx.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the COPYING file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
* $Id$
***************************************************************************/
#include "setup.h"
#ifdef USE_WINDOWS_SSPI
#include <curl/curl.h>
/*
* When including the folowing three headers, it is mandatory to define either
* SECURITY_WIN32 or SECURITY_KERNEL, indicating who is compiling the code.
*/
#undef SECURITY_WIN32
#undef SECURITY_KERNEL
#define SECURITY_WIN32 1
#include <security.h>
#include <sspi.h>
#include <rpc.h>
/* Provide some definitions missing in MinGW's headers */
#ifndef SEC_I_CONTEXT_EXPIRED
# define SEC_I_CONTEXT_EXPIRED ((HRESULT)0x00090317L)
#endif
#ifndef SEC_E_BUFFER_TOO_SMALL
# define SEC_E_BUFFER_TOO_SMALL ((HRESULT)0x80090321L)
#endif
#ifndef SEC_E_CONTEXT_EXPIRED
# define SEC_E_CONTEXT_EXPIRED ((HRESULT)0x80090317L)
#endif
#ifndef SEC_E_CRYPTO_SYSTEM_INVALID
# define SEC_E_CRYPTO_SYSTEM_INVALID ((HRESULT)0x80090337L)
#endif
#ifndef SEC_E_MESSAGE_ALTERED
# define SEC_E_MESSAGE_ALTERED ((HRESULT)0x8009030FL)
#endif
#ifndef SEC_E_OUT_OF_SEQUENCE
# define SEC_E_OUT_OF_SEQUENCE ((HRESULT)0x80090310L)
#endif
CURLcode Curl_sspi_global_init(void);
void Curl_sspi_global_cleanup(void);
/* Forward-declaration of global variables defined in curl_sspi.c */
extern HMODULE s_hSecDll;
extern PSecurityFunctionTableA s_pSecFn;
#endif /* USE_WINDOWS_SSPI */
#endif /* HEADER_CURL_SSPI_H */

View File

@@ -106,6 +106,7 @@ const struct Curl_handler Curl_handler_dict = {
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_getsock */
ZERO_NULL, /* doing_getsock */
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
PORT_DICT, /* defport */
PROT_DICT /* protocol */

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -111,7 +111,7 @@ static void win32_cleanup(void)
WSACleanup();
#endif
#ifdef USE_WINDOWS_SSPI
Curl_ntlm_global_cleanup();
Curl_sspi_global_cleanup();
#endif
}
@@ -156,7 +156,7 @@ static CURLcode win32_init(void)
#ifdef USE_WINDOWS_SSPI
{
CURLcode err = Curl_ntlm_global_init();
CURLcode err = Curl_sspi_global_init();
if (err != CURLE_OK)
return err;
}
@@ -624,13 +624,8 @@ CURL *curl_easy_duphandle(CURL *incurl)
if(Curl_dupset(outcurl, data) != CURLE_OK)
break;
if(data->state.used_interface == Curl_if_multi)
outcurl->state.connc = data->state.connc;
else
outcurl->state.connc = Curl_mk_connc(CONNCACHE_PRIVATE, -1);
if(!outcurl->state.connc)
break;
/* the connection cache is setup on demand */
outcurl->state.connc = NULL;
outcurl->state.lastconnect = -1;
@@ -727,6 +722,7 @@ void curl_easy_reset(CURL *curl)
/* zero out UserDefined data: */
Curl_freeset(data);
memset(&data->set, 0, sizeof(struct UserDefined));
(void)Curl_init_userdefined(&data->set);
/* zero out Progress data: */
memset(&data->progress, 0, sizeof(struct Progress));
@@ -734,58 +730,8 @@ void curl_easy_reset(CURL *curl)
/* init Handle data */
Curl_easy_initHandleData(data);
/* The remainder of these calls have been taken from Curl_open() */
data->set.out = stdout; /* default output to stdout */
data->set.in = stdin; /* default input from stdin */
data->set.err = stderr; /* default stderr to stderr */
/* use fwrite as default function to store output */
data->set.fwrite_func = (curl_write_callback)fwrite;
/* use fread as default function to read input */
data->set.fread_func = (curl_read_callback)fread;
data->set.infilesize = -1; /* we don't know any size */
data->set.postfieldsize = -1; /* unknown size */
data->set.maxredirs = -1; /* allow any amount by default */
data->state.current_speed = -1; /* init to negative == impossible */
data->set.httpreq = HTTPREQ_GET; /* Default HTTP request */
data->set.ftp_use_epsv = TRUE; /* FTP defaults to EPSV operations */
data->set.ftp_use_eprt = TRUE; /* FTP defaults to EPRT operations */
data->set.dns_cache_timeout = 60; /* Timeout every 60 seconds by default */
/* make libcurl quiet by default: */
data->set.hide_progress = TRUE; /* CURLOPT_NOPROGRESS changes these */
data->progress.flags |= PGRS_HIDE;
/* Set the default size of the SSL session ID cache */
data->set.ssl.numsessions = 5;
data->set.proxyport = CURL_DEFAULT_PROXY_PORT; /* from url.h */
data->set.proxytype = CURLPROXY_HTTP; /* defaults to HTTP proxy */
data->set.httpauth = CURLAUTH_BASIC; /* defaults to basic */
data->set.proxyauth = CURLAUTH_BASIC; /* defaults to basic */
/*
* libcurl 7.10 introduced SSL verification *by default*! This needs to be
* switched off unless wanted.
*/
data->set.ssl.verifypeer = TRUE;
data->set.ssl.verifyhost = 2;
/* This is our prefered CA cert bundle/path since install time */
#if defined(CURL_CA_BUNDLE)
(void) curl_easy_setopt(curl, CURLOPT_CAINFO, (char *) CURL_CA_BUNDLE);
#elif defined(CURL_CA_PATH)
(void) curl_easy_setopt(curl, CURLOPT_CAPATH, (char *) CURL_CA_PATH);
#endif
data->set.ssh_auth_types = CURLSSH_AUTH_DEFAULT; /* defaults to any auth
type */
data->set.new_file_perms = 0644; /* Default permissions */
data->set.new_directory_perms = 0755; /* Default permissions */
data->state.current_speed = -1; /* init to negative == impossible */
}
/*

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -119,6 +119,7 @@ const struct Curl_handler Curl_handler_file = {
ZERO_NULL, /* doing */
ZERO_NULL, /* proto_getsock */
ZERO_NULL, /* doing_getsock */
ZERO_NULL, /* perform_getsock */
ZERO_NULL, /* disconnect */
0, /* defport */
PROT_FILE /* protocol */
@@ -495,6 +496,10 @@ static CURLcode file_do(struct connectdata *conn, bool *done)
tm->tm_sec);
result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0);
}
/* if we fstat()ed the file, set the file size to make it available post-
transfer */
if(fstated)
Curl_pgrsSetDownloadSize(data, expected_size);
return result;
}

View File

@@ -222,9 +222,8 @@ static FormInfo * AddFormInfo(char *value,
FormInfo *parent_form_info)
{
FormInfo *form_info;
form_info = malloc(sizeof(FormInfo));
form_info = calloc(sizeof(FormInfo), 1);
if(form_info) {
memset(form_info, 0, sizeof(FormInfo));
if(value)
form_info->value = value;
if(contenttype)

Some files were not shown because too many files have changed in this diff Show More