platform/upstream/curl.git
11 years agocurl-override.m4: provide AC_CONFIG_MACRO_DIR definition conditionally
Yang Tse [Tue, 1 Jan 2013 16:26:32 +0000 (17:26 +0100)]
curl-override.m4: provide AC_CONFIG_MACRO_DIR definition conditionally

Provide a 'traceable' AC_CONFIG_MACRO_DIR definition only when using
an autoconf version that does not provide it, instead of what we were
doing up to now of providing and overriding AC_CONFIG_MACRO_DIR for
all autoconf versions.

11 years agoimap.c: Minor follow up tidy up
Steve Holme [Sun, 30 Dec 2012 12:46:45 +0000 (12:46 +0000)]
imap.c: Minor follow up tidy up

11 years agoimap: Code tidy up prior to adding support for the CAPABILITY command
Steve Holme [Sun, 30 Dec 2012 12:44:09 +0000 (12:44 +0000)]
imap: Code tidy up prior to adding support for the CAPABILITY command

* Changing the order of the state machine to represent the order in
  which commands are sent to the server.

* Reworking the imap_endofresp() function as the FETCH response doesn't
  include the command id and shouldn't be part of the length comparison
  that takes into account the id string.

11 years agopop3_doing: Applied debug info message when function fails
Steve Holme [Sat, 29 Dec 2012 23:26:17 +0000 (23:26 +0000)]
pop3_doing: Applied debug info message when function fails

Applied the same debug message as used in smtp_doing() and imap_doing()
when pop3_multi_statemach() fails.

11 years agoimap_doing: don't call imap_dophase_done() if already failed
Steve Holme [Sat, 29 Dec 2012 23:15:05 +0000 (23:15 +0000)]
imap_doing: don't call imap_dophase_done() if already failed

Applied the POP3 fix from commit 2897ce7dc2e1 so imap_dophase_done()
isn't called if imap_multi_statemach() fails.

11 years agosmtp_doing: don't call smtp_dophase_done() if already failed
Steve Holme [Sat, 29 Dec 2012 23:06:25 +0000 (23:06 +0000)]
smtp_doing: don't call smtp_dophase_done() if already failed

Applied the POP3 fix from commit 2897ce7dc2e1 so smtp_dophase_done()
isn't called if smtp_multi_statemach() fails.

11 years agoexamples/certinfo.c: fix compiler warning
Yang Tse [Sat, 29 Dec 2012 01:57:08 +0000 (02:57 +0100)]
examples/certinfo.c: fix compiler warning

11 years agopop3.c: Removed unnecessary POP3_STOP state changes
Steve Holme [Sat, 29 Dec 2012 19:39:06 +0000 (19:39 +0000)]
pop3.c: Removed unnecessary POP3_STOP state changes

Removed unnecessary state changes in pop3_state_starttls_resp()
following previous fix in IMAP module.

11 years agosmtp.c: Added extra comments around SMTP_STOP state change
Steve Holme [Sat, 29 Dec 2012 19:28:32 +0000 (19:28 +0000)]
smtp.c: Added extra comments around SMTP_STOP state change

Provided extra comments in the SMTP module following previous IMAP fix.

11 years agoimap.c: Fixed bad state error when logging in with invalid credentials
Steve Holme [Sat, 29 Dec 2012 19:23:10 +0000 (19:23 +0000)]
imap.c: Fixed bad state error when logging in with invalid credentials

Fixed a problem with the state machine when attempting to log in with
invalid credentials. The server would report login failure but libcurl
would not read the response due to inappropriate IMAP_STOP states being
set after the login was sent.

11 years agoimap.c: remove trailing whitespace
Yang Tse [Fri, 28 Dec 2012 23:59:11 +0000 (00:59 +0100)]
imap.c: remove trailing whitespace

11 years agoimap.c: Code tidy up - Part 2
Steve Holme [Fri, 28 Dec 2012 21:41:28 +0000 (21:41 +0000)]
imap.c: Code tidy up - Part 2

11 years agoimap.c: Code tidy up - Part 1
Steve Holme [Fri, 28 Dec 2012 21:24:36 +0000 (21:24 +0000)]
imap.c: Code tidy up - Part 1

Applied some of the comment and layout changes that had already been
applied to the pop3 and smtp code over the last 6 to 9 months.

This is in preparation of adding SASL based authentication.

11 years agopop3.c: Minor code tidy up
Steve Holme [Fri, 28 Dec 2012 20:30:04 +0000 (20:30 +0000)]
pop3.c: Minor code tidy up

Minor tidy up of comments and layout prior to next part of imap work.

11 years agosmtp: Minor code tidy up
Steve Holme [Fri, 28 Dec 2012 20:22:33 +0000 (20:22 +0000)]
smtp: Minor code tidy up

Minor tidy up of comments and layout prior to next part of imap work.

11 years agocurl_imap.h: Tidy up of comments to be more readable
Steve Holme [Fri, 28 Dec 2012 19:59:14 +0000 (19:59 +0000)]
curl_imap.h: Tidy up of comments to be more readable

11 years agoimap.c: Code tidy up renaming imapsendf() to imap_sendf()
Steve Holme [Fri, 28 Dec 2012 19:48:00 +0000 (19:48 +0000)]
imap.c: Code tidy up renaming imapsendf() to imap_sendf()

Renamed imapsendf() to imap_sendf() to be more in keeping with the
other imap functions as well as Curl_pp_sendf() that it replaces.

11 years agobuild: rename 76 lib/*.h files
Yang Tse [Fri, 28 Dec 2012 19:21:56 +0000 (20:21 +0100)]
build: rename 76 lib/*.h files

76 private header files renamed to use our standard naming scheme.

This commit only does the file renaming.

----------------------------------------

  renamed:    amigaos.h -> curl_amigaos.h
  renamed:    arpa_telnet.h -> curl_arpa_telnet.h
  renamed:    asyn.h -> curl_asyn.h
  renamed:    axtls.h -> curl_axtls.h
  renamed:    bundles.h -> curl_bundles.h
  renamed:    conncache.h -> curl_conncache.h
  renamed:    connect.h -> curl_connect.h
  renamed:    content_encoding.h -> curl_content_encoding.h
  renamed:    cookie.h -> curl_cookie.h
  renamed:    cyassl.h -> curl_cyassl.h
  renamed:    dict.h -> curl_dict.h
  renamed:    easyif.h -> curl_easyif.h
  renamed:    escape.h -> curl_escape.h
  renamed:    file.h -> curl_file.h
  renamed:    fileinfo.h -> curl_fileinfo.h
  renamed:    formdata.h -> curl_formdata.h
  renamed:    ftp.h -> curl_ftp.h
  renamed:    ftplistparser.h -> curl_ftplistparser.h
  renamed:    getinfo.h -> curl_getinfo.h
  renamed:    gopher.h -> curl_gopher.h
  renamed:    gtls.h -> curl_gtls.h
  renamed:    hash.h -> curl_hash.h
  renamed:    hostcheck.h -> curl_hostcheck.h
  renamed:    hostip.h -> curl_hostip.h
  renamed:    http.h -> curl_http.h
  renamed:    http_chunks.h -> curl_http_chunks.h
  renamed:    http_digest.h -> curl_http_digest.h
  renamed:    http_negotiate.h -> curl_http_negotiate.h
  renamed:    http_proxy.h -> curl_http_proxy.h
  renamed:    if2ip.h -> curl_if2ip.h
  renamed:    imap.h -> curl_imap.h
  renamed:    inet_ntop.h -> curl_inet_ntop.h
  renamed:    inet_pton.h -> curl_inet_pton.h
  renamed:    krb4.h -> curl_krb4.h
  renamed:    llist.h -> curl_llist.h
  renamed:    memdebug.h -> curl_memdebug.h
  renamed:    multiif.h -> curl_multiif.h
  renamed:    netrc.h -> curl_netrc.h
  renamed:    non-ascii.h -> curl_non-ascii.h
  renamed:    nonblock.h -> curl_nonblock.h
  renamed:    nssg.h -> curl_nssg.h
  renamed:    parsedate.h -> curl_parsedate.h
  renamed:    pingpong.h -> curl_pingpong.h
  renamed:    polarssl.h -> curl_polarssl.h
  renamed:    pop3.h -> curl_pop3.h
  renamed:    progress.h -> curl_progress.h
  renamed:    qssl.h -> curl_qssl.h
  renamed:    rawstr.h -> curl_rawstr.h
  renamed:    rtsp.h -> curl_rtsp.h
  renamed:    select.h -> curl_select.h
  renamed:    sendf.h -> curl_sendf.h
  renamed:    setup.h -> curl_setup.h
  renamed:    setup_once.h -> curl_setup_once.h
  renamed:    share.h -> curl_share.h
  renamed:    slist.h -> curl_slist.h
  renamed:    smtp.h -> curl_smtp.h
  renamed:    sockaddr.h -> curl_sockaddr.h
  renamed:    socks.h -> curl_socks.h
  renamed:    speedcheck.h -> curl_speedcheck.h
  renamed:    splay.h -> curl_splay.h
  renamed:    ssh.h -> curl_ssh.h
  renamed:    sslgen.h -> curl_sslgen.h
  renamed:    ssluse.h -> curl_ssluse.h
  renamed:    strdup.h -> curl_strdup.h
  renamed:    strequal.h -> curl_strequal.h
  renamed:    strerror.h -> curl_strerror.h
  renamed:    strtok.h -> curl_strtok.h
  renamed:    strtoofft.h -> curl_strtoofft.h
  renamed:    telnet.h -> curl_telnet.h
  renamed:    tftp.h -> curl_tftp.h
  renamed:    timeval.h -> curl_timeval.h
  renamed:    transfer.h -> curl_transfer.h
  renamed:    url.h -> curl_url.h
  renamed:    urldata.h -> curl_urldata.h
  renamed:    warnless.h -> curl_warnless.h
  renamed:    wildcard.h -> curl_wildcard.h

----------------------------------------

11 years agobuild: make use of 76 lib/*.h renamed files
Yang Tse [Fri, 28 Dec 2012 11:40:20 +0000 (12:40 +0100)]
build: make use of 76 lib/*.h renamed files

76 private header files renamed to use our standard naming scheme.

This change affects 322 files in libcurl's source tree.

11 years agolib/*.h: use our standard naming scheme for header inclusion guards
Yang Tse [Fri, 28 Dec 2012 11:03:09 +0000 (12:03 +0100)]
lib/*.h: use our standard naming scheme for header inclusion guards

11 years agoimsp.c: Fixed usernames and passwords that contain escape characters
Steve Holme [Fri, 28 Dec 2012 14:49:30 +0000 (14:49 +0000)]
imsp.c: Fixed usernames and passwords that contain escape characters

Fixed a problem with sending usernames and passwords that contain
backslash, quotation mark and space characters.

11 years agocurl.1: extend the -X, --request description
Daniel Stenberg [Thu, 27 Dec 2012 22:33:14 +0000 (23:33 +0100)]
curl.1: extend the -X, --request description

11 years agoRELEASE-NOTES: synced with e3ed2b82e6
Daniel Stenberg [Thu, 27 Dec 2012 19:15:07 +0000 (20:15 +0100)]
RELEASE-NOTES: synced with e3ed2b82e6

11 years agodarwinssl: Fixed inability to disable peer verification
Nick Zitzmann [Thu, 27 Dec 2012 01:29:50 +0000 (17:29 -0800)]
darwinssl: Fixed inability to disable peer verification

... on Snow Leopard and Lion

Snow Leopard introduced the SSLSetSessionOption() function, but it
doesn't disable peer verification as expected on Snow Leopard or
Lion (it works as expected in Mountain Lion). So we now use sysctl()
to detect whether or not the user is using Snow Leopard or Lion,
and if that's the case, then we now use the deprecated
SSLSetEnableCertVerify() function instead to disable peer verification.

11 years agocurl tool: rename hugehelp files to tool_hugehelp
Yang Tse [Wed, 26 Dec 2012 22:34:41 +0000 (23:34 +0100)]
curl tool: rename hugehelp files to tool_hugehelp

11 years agocurl tool: renaming hugehelp files to tool_hugehelp
Yang Tse [Wed, 26 Dec 2012 22:30:54 +0000 (23:30 +0100)]
curl tool: renaming hugehelp files to tool_hugehelp

11 years agosockfilt.c: commit b44da5a82a follow-up 2
Yang Tse [Wed, 26 Dec 2012 19:03:35 +0000 (20:03 +0100)]
sockfilt.c: commit b44da5a82a follow-up 2

11 years agosockfilt.c: commit b44da5a82a follow-up
Yang Tse [Wed, 26 Dec 2012 18:30:22 +0000 (19:30 +0100)]
sockfilt.c: commit b44da5a82a follow-up

11 years agosockfilt.c: fix some compiler warnings
Yang Tse [Wed, 26 Dec 2012 16:17:52 +0000 (17:17 +0100)]
sockfilt.c: fix some compiler warnings

11 years agocurl_multi_remove_handle: commit 0aabfd9963 follow-up
Yang Tse [Wed, 26 Dec 2012 05:00:59 +0000 (06:00 +0100)]
curl_multi_remove_handle: commit 0aabfd9963 follow-up

11 years agolib556: enable VERBOSE to ease debugging on failures
Daniel Stenberg [Sun, 2 Dec 2012 10:17:12 +0000 (11:17 +0100)]
lib556: enable VERBOSE to ease debugging on failures

11 years agosocklift.c: Quick fix to re-add missing code
Marc Hoersken [Tue, 25 Dec 2012 14:18:01 +0000 (15:18 +0100)]
socklift.c: Quick fix to re-add missing code

11 years agosocklift.c: Added select_ws function to support Windows
Marc Hoersken [Tue, 25 Dec 2012 14:15:24 +0000 (15:15 +0100)]
socklift.c: Added select_ws function to support Windows

WinSock select() does not support standard file descriptors,
it can only check SOCKETs. The following function is an attempt
to create a select() function with support for other handles.

11 years agoEnable tests 1503, 1504 and 1505
Yang Tse [Tue, 25 Dec 2012 12:32:47 +0000 (13:32 +0100)]
Enable tests 1503, 1504 and 1505

11 years agocurl_multi_remove_handle: fix memory leak triggered with CURLOPT_RESOLVE
Yang Tse [Tue, 25 Dec 2012 12:31:26 +0000 (13:31 +0100)]
curl_multi_remove_handle: fix memory leak triggered with CURLOPT_RESOLVE

11 years agoCurl_hash_clean: OOM handling fix
Yang Tse [Tue, 25 Dec 2012 12:30:41 +0000 (13:30 +0100)]
Curl_hash_clean: OOM handling fix

11 years agotest 1504 and 1505: same as 1502 but with different cleanup sequences
Yang Tse [Mon, 24 Dec 2012 13:04:34 +0000 (14:04 +0100)]
test 1504 and 1505: same as 1502 but with different cleanup sequences

11 years agoCurl_conncache_foreach: allow callback to break loop
Daniel Stenberg [Tue, 11 Dec 2012 19:13:29 +0000 (20:13 +0100)]
Curl_conncache_foreach: allow callback to break loop

... and have it take a proper 'struct connectdata *' as first argument

11 years agopop3_doing: don't call pop3_dophase_done() if already failed
Daniel Stenberg [Sat, 15 Dec 2012 14:31:38 +0000 (15:31 +0100)]
pop3_doing: don't call pop3_dophase_done() if already failed

... it also clobbered the 'result' return value so that it wouldn't
return the error back to the parent function properly, which broke test
809 when run with 'multi-always'.

11 years agotest 1503: same as 1502 but with a different cleanup sequence
Yang Tse [Sun, 23 Dec 2012 20:33:26 +0000 (21:33 +0100)]
test 1503: same as 1502 but with a different cleanup sequence

11 years agotest 1502: OOM handling fixes
Yang Tse [Sun, 23 Dec 2012 20:22:03 +0000 (21:22 +0100)]
test 1502: OOM handling fixes

11 years agocurl_multi_wait: OOM handling fix
Yang Tse [Sun, 23 Dec 2012 20:10:45 +0000 (21:10 +0100)]
curl_multi_wait: OOM handling fix

11 years agocurl_multi_wait: avoid an unnecessary memory allocation
Daniel Stenberg [Sun, 23 Dec 2012 20:06:40 +0000 (21:06 +0100)]
curl_multi_wait: avoid an unnecessary memory allocation

11 years agoruntests.pl: prepend $srcdir to HTTPTLS server config files path
Yang Tse [Fri, 21 Dec 2012 23:26:03 +0000 (00:26 +0100)]
runtests.pl: prepend $srcdir to HTTPTLS server config files path

11 years agomulti.c: OOM handling fix
Yang Tse [Fri, 21 Dec 2012 18:48:07 +0000 (19:48 +0100)]
multi.c: OOM handling fix

11 years agolib543.c: OOM handling fixes
Yang Tse [Fri, 21 Dec 2012 17:32:20 +0000 (18:32 +0100)]
lib543.c: OOM handling fixes

11 years agoconfigure: add internal sanity check (warn only) on vars for makefiles
Yang Tse [Fri, 21 Dec 2012 16:26:19 +0000 (17:26 +0100)]
configure: add internal sanity check (warn only) on vars for makefiles

11 years agoSCP: relative path didn't work
Daniel Stenberg [Fri, 21 Dec 2012 13:38:33 +0000 (14:38 +0100)]
SCP: relative path didn't work

When prefixing a path with /~/ it is supposed to be used relative to the
user's home directory but it didn't work. Now we cut off the entire
three byte sequenct "/~/" which seems to be how OpenSSH does it.

Bug: http://curl.haxx.se/bug/view.cgi?id=1173
Reported by: Balaji Parasuram

11 years agoconfigure: LIBMETALINK_CFLAGS actually is LIBMETALINK_CPPFLAGS
Yang Tse [Fri, 21 Dec 2012 12:00:00 +0000 (13:00 +0100)]
configure: LIBMETALINK_CFLAGS actually is LIBMETALINK_CPPFLAGS

11 years agoconfigure: add minimal sanity check on user provided CFLAGS and CPPFLAGS
Yang Tse [Thu, 20 Dec 2012 16:13:21 +0000 (17:13 +0100)]
configure: add minimal sanity check on user provided CFLAGS and CPPFLAGS

11 years agobundles connection caching: some out of memory handling fixes
Yang Tse [Wed, 19 Dec 2012 18:52:11 +0000 (19:52 +0100)]
bundles connection caching: some out of memory handling fixes

11 years agolibntlmconnect.c: fix compiler warnings and OOM handling
Yang Tse [Wed, 19 Dec 2012 18:51:20 +0000 (19:51 +0100)]
libntlmconnect.c: fix compiler warnings and OOM handling

11 years agoconfigure.ac: clear local test intended variables before use
Yang Tse [Wed, 19 Dec 2012 15:08:07 +0000 (16:08 +0100)]
configure.ac: clear local test intended variables before use

11 years agoVC6 IDE: link with advapi32.lib when using WIN32 crypto API (md5.c)
Yang Tse [Tue, 18 Dec 2012 12:05:54 +0000 (13:05 +0100)]
VC6 IDE: link with advapi32.lib when using WIN32 crypto API (md5.c)

11 years agocurl-functions.m4: improve gethostname arg 2 data type check
Yang Tse [Mon, 17 Dec 2012 15:31:24 +0000 (16:31 +0100)]
curl-functions.m4: improve gethostname arg 2 data type check

11 years agosetup_once.h: HP-UX specific 'bool', 'false' and 'true' definitions.
Yang Tse [Mon, 17 Dec 2012 01:07:10 +0000 (02:07 +0100)]
setup_once.h: HP-UX specific 'bool', 'false' and 'true' definitions.

Also reverts commit f254c59dc7

11 years agoconfigure: check if compiler halts on function prototype mismatch
Yang Tse [Sun, 16 Dec 2012 17:51:51 +0000 (18:51 +0100)]
configure: check if compiler halts on function prototype mismatch

11 years agowarnless.c: fix compiler warnings
Yang Tse [Sat, 15 Dec 2012 19:31:42 +0000 (20:31 +0100)]
warnless.c: fix compiler warnings

11 years agocurl-functions.m4: add gethostname arg 2 data type check and definition
Yang Tse [Sat, 15 Dec 2012 16:46:28 +0000 (17:46 +0100)]
curl-functions.m4: add gethostname arg 2 data type check and definition

11 years agodarwinssl: Fix implicit conversion compiler warnings
Nick Zitzmann [Wed, 12 Dec 2012 04:43:48 +0000 (21:43 -0700)]
darwinssl: Fix implicit conversion compiler warnings

The Clang compiler found a few implicit conversion problems that have
now been fixed.

11 years agosetup_once.h: HP-UX <sys/socket.h> issue workaround
Yang Tse [Fri, 14 Dec 2012 18:39:22 +0000 (19:39 +0100)]
setup_once.h: HP-UX <sys/socket.h> issue workaround

Issue: When building a 32bit target with large file support HP-UX
<sys/socket.h> header file may simultaneously provide two different
sets of declarations for sendfile and sendpath functions, one with
static and another with external linkage. Given that we do not use
mentioned functions we really don't care which linkage is the
appropriate one, but on the other hand, the double declaration emmits
warnings when using the HP-UX compiler and errors when using modern
gcc versions resulting in fatal compilation errors.

Mentioned issue is now fixed as long as we don't use sendfile nor
sendpath functions.

11 years agosetup_once.h: refactor inclusion of <unistd.h> and <sys/socket.h>
Yang Tse [Fri, 14 Dec 2012 16:38:18 +0000 (17:38 +0100)]
setup_once.h: refactor inclusion of <unistd.h> and <sys/socket.h>

Inclusion of top two most included header files now done in setup_once.h

11 years agosetup_once.h: HP-UX specific TRUE and FALSE definitions
Yang Tse [Wed, 12 Dec 2012 15:13:16 +0000 (16:13 +0100)]
setup_once.h: HP-UX specific TRUE and FALSE definitions

Some HP-UX system headers require TRUE defined to 1 and FALSE to 0.

11 years agogopher: #include cleanup
Daniel Stenberg [Wed, 12 Dec 2012 10:07:30 +0000 (11:07 +0100)]
gopher: #include cleanup

Remove all system file includes from this file as they're not needed

Reported by: Dan Fandrich

11 years agoexamples/simplessl.c: fix compiler warning
Yang Tse [Tue, 11 Dec 2012 14:03:17 +0000 (15:03 +0100)]
examples/simplessl.c: fix compiler warning

11 years agoexamples/externalsocket.c: fix SunPro compilation issue
Yang Tse [Mon, 10 Dec 2012 17:06:35 +0000 (18:06 +0100)]
examples/externalsocket.c: fix SunPro compilation issue

11 years agoexamples/simplessl.c: fix compiler warning
Yang Tse [Mon, 10 Dec 2012 16:55:18 +0000 (17:55 +0100)]
examples/simplessl.c: fix compiler warning

11 years agobuild: add bundles and conncache files to other build systems
Yang Tse [Mon, 10 Dec 2012 16:32:35 +0000 (17:32 +0100)]
build: add bundles and conncache files to other build systems

11 years agoconncache: fix enumerated type mixed with another type
Yang Tse [Mon, 10 Dec 2012 16:04:13 +0000 (17:04 +0100)]
conncache: fix enumerated type mixed with another type

11 years agoexamples/anyauthput.c: fix Tru64 compilation issue
Yang Tse [Mon, 10 Dec 2012 14:42:12 +0000 (15:42 +0100)]
examples/anyauthput.c: fix Tru64 compilation issue

11 years agoconfigure: fix cross pkg-config detection
Colin Watson [Fri, 7 Dec 2012 11:07:54 +0000 (12:07 +0100)]
configure: fix cross pkg-config detection

When cross-compiling, CURL_CHECK_PKGCONFIG was checking for the cross
pkg-config using ${host}-pkg-config.

The gold standard for doing this correctly is pkg-config's own macro,
PKG_PROG_PKG_CONFIG.  However, on the assumption that you have a good
reason not to use that directly (reduced dependencies for maintainer
builds?), the behaviour of cURL's version should at least match.
PKG_PROG_PKG_CONFIG uses AC_PATH_TOOL, which ultimately ends up trying
${host_alias}-pkg-config; this is not quite the same as what cURL does,
and may differ because ${host} has been run through config.sub.  For
instance, when cross-building to the armhf architecture on Ubuntu,
${host_alias} is arm-linux-gnueabihf while ${host} is
arm-unknown-linux-gnueabihf.  This may also have been the cause of the
problem reported at http://curl.haxx.se/mail/lib-2012-04/0224.html.

AC_PATH_TOOL is significantly simpler than cURL's current code, and
dates back to well before the current minimum of Autoconf 2.57, so let's
use it instead.

11 years agoIntroducing a new persistent connection caching system using "bundles".
Linus Nielsen Feltzing [Thu, 6 Dec 2012 11:12:04 +0000 (12:12 +0100)]
Introducing a new persistent connection caching system using "bundles".

A bundle is a list of all persistent connections to the same host.
The connection cache consists of a hash of bundles, with the
hostname as the key.
The benefits may not be obvious, but they are two:

1) Faster search for connections to reuse, since the hash
   lookup only finds connections to the host in question.
2) It lays out the groundworks for an upcoming patch,
   which will introduce multiple HTTP pipelines.

This patch also removes the awkward list of "closure handles",
which were needed to send QUIT commands to the FTP server
when closing a connection.
Now we allocate a separate closure handle and use that
one to close all connections.

This has been tested in a live system for a few weeks, and of
course passes the test suite.

11 years agoruntests and friends: Do not add undefined values to @INC
Fabian Keil [Wed, 14 Nov 2012 10:40:31 +0000 (11:40 +0100)]
runtests and friends: Do not add undefined values to @INC

On FreeBSD this fixes the warning:
Use of uninitialized value $p in string eq at /usr/local/lib/perl5/5.14.2/BSDPAN/BSDPAN.pm line 36.

11 years agoMerge pull request #52 from isn-/master
Steve Holme [Wed, 5 Dec 2012 19:46:00 +0000 (11:46 -0800)]
Merge pull request #52 from isn-/master

small compilation fix

11 years agobuild: fix compilation with CURL_DISABLE_CRYPTO_AUTH flag
Stanislav Ivochkin [Wed, 5 Dec 2012 18:31:40 +0000 (22:31 +0400)]
build: fix compilation with CURL_DISABLE_CRYPTO_AUTH flag

11 years agolibtest: fix some compiler warnings
Yang Tse [Wed, 5 Dec 2012 16:28:32 +0000 (17:28 +0100)]
libtest: fix some compiler warnings

11 years agoexamples: fix compilation issues - commit 7332a7cafb follow-up
Yang Tse [Wed, 5 Dec 2012 11:59:14 +0000 (12:59 +0100)]
examples: fix compilation issues - commit 7332a7cafb follow-up

11 years agoexamples: fix compilation issues - commit 23f8dca6fb follow-up
Yang Tse [Wed, 5 Dec 2012 10:43:40 +0000 (11:43 +0100)]
examples: fix compilation issues - commit 23f8dca6fb follow-up

11 years agoexamples: fix compilation issues
Yang Tse [Tue, 4 Dec 2012 23:37:57 +0000 (00:37 +0100)]
examples: fix compilation issues

11 years agobuild: explain current role of LIBS in our Makefile.am files
Yang Tse [Tue, 4 Dec 2012 22:30:05 +0000 (23:30 +0100)]
build: explain current role of LIBS in our Makefile.am files

BLANK_AT_MAKETIME may be used in our Makefile.am files to blank
LIBS variable used in generated makefile at makefile processing
time. Doing this functionally prevents LIBS from being used for
all link targets in given makefile.

11 years agomulti: fix re-sending request on early connection close
Daniel Stenberg [Fri, 30 Nov 2012 13:52:38 +0000 (14:52 +0100)]
multi: fix re-sending request on early connection close

This handling already works with the easy-interface code. When a request
is sent on a re-used connection that gets closed by the server at the
same time as the request is sent, the situation may occur so that we can
send the request and we discover the broken connection as a RECV_ERROR
in the PERFORM state and then the request needs to be retried on a fresh
connection. Test 64 broke with 'multi-always-internally'.

11 years agoconfigure: add minimal sanity check on user provided LIBS and LDFLAGS
Yang Tse [Tue, 4 Dec 2012 20:00:32 +0000 (21:00 +0100)]
configure: add minimal sanity check on user provided LIBS and LDFLAGS

11 years agobuild: prevent global LIBS from influencing src and lib build targets
Yang Tse [Mon, 3 Dec 2012 21:40:26 +0000 (22:40 +0100)]
build: prevent global LIBS from influencing src and lib build targets

Currently, LIBS is already used through other macros.

11 years agonss: prevent NSS from crashing on client auth hook failure
Kamil Dudka [Mon, 3 Dec 2012 12:17:50 +0000 (13:17 +0100)]
nss: prevent NSS from crashing on client auth hook failure

Although it is not explicitly stated in the documentation, NSS uses
*pRetCert and *pRetKey even if the client authentication hook returns
a failure.  Namely, if we destroy *pRetCert without clearing *pRetCert
afterwards, NSS destroys the certificate once again, which causes a
double free.

Reported by: Bob Relyea

11 years agotestcurl.pl: build example programs for several autobuilds
Yang Tse [Fri, 30 Nov 2012 18:13:50 +0000 (19:13 +0100)]
testcurl.pl: build example programs for several autobuilds

Affected autobuilds: IRIX, AIX, Tru64 and AIX.

11 years agobuild: prevent global LIBS from influencing examples build targets
Yang Tse [Fri, 30 Nov 2012 18:12:18 +0000 (19:12 +0100)]
build: prevent global LIBS from influencing examples build targets

11 years agobuild: prevent global LIBS from influencing libtest build targets
Yang Tse [Fri, 30 Nov 2012 13:34:48 +0000 (14:34 +0100)]
build: prevent global LIBS from influencing libtest build targets

11 years agobuild: prevent global LIBS from influencing test server build targets
Yang Tse [Thu, 29 Nov 2012 20:56:48 +0000 (21:56 +0100)]
build: prevent global LIBS from influencing test server build targets

11 years agobuild: fix Windows build targets damaged since commit 550e403f00
Yang Tse [Wed, 28 Nov 2012 19:51:13 +0000 (20:51 +0100)]
build: fix Windows build targets damaged since commit 550e403f00

11 years agobuild: avoid linkage of directly unused libraries
Yang Tse [Wed, 28 Nov 2012 17:31:23 +0000 (18:31 +0100)]
build: avoid linkage of directly unused libraries

11 years agodd missing NTLM feature for tests 2025, and 2028 to 2032
Yang Tse [Tue, 27 Nov 2012 17:01:55 +0000 (18:01 +0100)]
dd missing NTLM feature for tests 2025, and 2028 to 2032

11 years agoavoid mixing of enumerated type with another type
Yang Tse [Mon, 26 Nov 2012 15:23:02 +0000 (16:23 +0100)]
avoid mixing of enumerated type with another type

11 years agomulti.c: disambiguate precedence of bitwise and relational operation
Yang Tse [Mon, 26 Nov 2012 15:20:53 +0000 (16:20 +0100)]
multi.c: disambiguate precedence of bitwise and relational operation

11 years agoRemove stray CRLF in chunk-encoded content-free request bodies
Fabian Keil [Sun, 25 Nov 2012 17:34:01 +0000 (18:34 +0100)]
Remove stray CRLF in chunk-encoded content-free request bodies

.. that are sent when auth-negotiating before a chunked
upload or when setting the 'Transfer-Encoding: chunked'
header and intentionally sending no content.

Adjust test565 and test1333 accordingly.

11 years agoFAQ: clarify the 3.4 section
Daniel Stenberg [Sun, 25 Nov 2012 18:44:49 +0000 (19:44 +0100)]
FAQ: clarify the 3.4 section

You can do custom commands to FTP without sending anything by using the
CURLOPT_NOBODY, which -I sets.

11 years agoexamples: Updated asiohiper.cpp to remove connect from opensocket
Lijo Antony [Sun, 25 Nov 2012 06:00:58 +0000 (10:00 +0400)]
examples: Updated asiohiper.cpp to remove connect from opensocket

Blocking connect on the socket has been removed from opensocket
callback. opensocket just opens a new socket and gives it back to
libcurl and libcurl will take care of the connect. sockopt_callback has
also been removed, as it is no longer required.

11 years agobuild: fix AIX compilation and usage
Yang Tse [Fri, 23 Nov 2012 16:57:00 +0000 (17:57 +0100)]
build: fix AIX compilation and usage

AIX sys/poll.h header file defines 'events' and 'revents' as C
preprocessor macros. Usage of these literals in libcurl's external
API was introduced in commit de24d7bd4c causing AIX build failures.
Appropriate inclusion of sys/poll.h by libcurl's external interface
fixes AIX build and usage issues while avoiding a SONAME bump.

11 years agoDOCS: Updated CURLOPT_CONNECT_ONLY to reflect usage in other protocols
Steve Holme [Fri, 23 Nov 2012 13:43:53 +0000 (13:43 +0000)]
DOCS: Updated CURLOPT_CONNECT_ONLY to reflect usage in other protocols

11 years agotest: offer "automake" output and check for perl better
Daniel Stenberg [Fri, 23 Nov 2012 10:56:26 +0000 (11:56 +0100)]
test: offer "automake" output and check for perl better

runtests.pl -am now uses the "PASS/FAIL: [desc]" output for each
executed test. You can run 'make test-am' in the root build directory to
invoke that. The reason for this output style is to better allow generic
test suite parsers to also grok our test output.

The test Makefile now also tests that perl was indeed found and that the
PERL variable points to an executable before it tries to run the main
test perl script runtests.pl,

11 years agoTest 206: Use a Content-Length header for the 407 response
Fabian Keil [Wed, 21 Nov 2012 15:01:59 +0000 (16:01 +0100)]
Test 206: Use a Content-Length header for the 407 response

Otherwise curl would have to guess where the body ends.