platform/upstream/curl.git
10 years agosockfilt.c: follow up cleanup commit on 49b63cf3
Marc Hoersken [Sun, 26 Jan 2014 08:44:16 +0000 (09:44 +0100)]
sockfilt.c: follow up cleanup commit on 49b63cf3

10 years agohttp-pipe tests: use text as output data mode to support Windows
Marc Hoersken [Sun, 26 Jan 2014 08:19:32 +0000 (09:19 +0100)]
http-pipe tests: use text as output data mode to support Windows

10 years agosockfilt.c: fixed and simplified Windows select function
Marc Hoersken [Sat, 25 Jan 2014 23:58:30 +0000 (00:58 +0100)]
sockfilt.c: fixed and simplified Windows select function

Since the previous complex select function with initial support for
non-socket file descriptors, did not actually work correctly for
Console handles, this change simplifies the whole procedure by using
an internal waiting thread for the stdin console handle.

The previous implementation made it continuously trigger for the stdin
handle if it was being redirected to a parent process instead of
an actual Console input window.

This approach supports actual Console input handles as well as
anonymous Pipe handles which are used during input redirection.

It depends on the fact that ReadFile supports trying to read zero bytes
which makes it wait for the handle to become ready for reading.

10 years agohttp_pipe.py: replaced epoll with select to support Windows
Marc Hoersken [Sat, 25 Jan 2014 19:52:42 +0000 (20:52 +0100)]
http_pipe.py: replaced epoll with select to support Windows

Removed Unix-specific functionality in order to support Windows:
- select.epoll replaced with select.select
- SocketServer.ForkingMixIn replaced with SocketServer.ForkingMixIn
- socket.MSG_DONTWAIT replaced with socket.setblocking(False)

Even though epoll has a better performance and improved socket handling
than select, this change should not affect the actual test case.

10 years agotests: Added missing HTTP proxy keywords
Dan Fandrich [Sat, 25 Jan 2014 15:55:05 +0000 (16:55 +0100)]
tests: Added missing HTTP proxy keywords

10 years agotests: added missing <features> http to a number of tests
Dan Fandrich [Sat, 25 Jan 2014 11:47:04 +0000 (12:47 +0100)]
tests: added missing <features> http to a number of tests

10 years agotests: Added a keyword for tests depending on internal info logs
Dan Fandrich [Fri, 24 Jan 2014 22:29:35 +0000 (23:29 +0100)]
tests: Added a keyword for tests depending on internal info logs

10 years agoruntests: Don't log command every torture iteration in verbose
Dan Fandrich [Fri, 24 Jan 2014 22:14:19 +0000 (23:14 +0100)]
runtests: Don't log command every torture iteration in verbose

10 years agotests: Added missing http feature to tests 509 & 1513
Dan Fandrich [Fri, 24 Jan 2014 22:14:00 +0000 (23:14 +0100)]
tests: Added missing http feature to tests 509 & 1513

10 years agonetrc: Fixed a memory and file descriptor leak on OOM
Dan Fandrich [Fri, 24 Jan 2014 20:52:48 +0000 (21:52 +0100)]
netrc: Fixed a memory and file descriptor leak on OOM

10 years agotest1514: Used the macros for host and port number
Dan Fandrich [Fri, 24 Jan 2014 07:16:17 +0000 (08:16 +0100)]
test1514: Used the macros for host and port number

10 years agomulti: Fixed a memory leak on OOM condition
Dan Fandrich [Thu, 23 Jan 2014 23:22:08 +0000 (00:22 +0100)]
multi: Fixed a memory leak on OOM condition

10 years agocurl_easy_setopt.3: remove what auth types that work for CURLOPT_PROXYAUTH
Daniel Stenberg [Thu, 23 Jan 2014 22:22:07 +0000 (23:22 +0100)]
curl_easy_setopt.3: remove what auth types that work for CURLOPT_PROXYAUTH

The list was out of date and the paragraph already refers to the
CURLOPT_HTTPAUTH explanation. All the auth bits are explained properly
there.

It also removes the ambiguity for what the "added" phrase refers to.

This change based on pull request #85 on github

URL: https://github.com/bagder/curl/pull/85
Reported-by: gnawhleinad
10 years agotest1514: Got rid of a non-const initializer C99ism
Dan Fandrich [Wed, 22 Jan 2014 00:47:53 +0000 (01:47 +0100)]
test1514: Got rid of a non-const initializer C99ism

10 years agoRELEASE-NOTES: added another missing bug ref
Steve Holme [Tue, 21 Jan 2014 21:35:36 +0000 (21:35 +0000)]
RELEASE-NOTES: added another missing bug ref

10 years agoRELEASE-NOTES: added missing bug ref
Daniel Stenberg [Tue, 21 Jan 2014 14:44:04 +0000 (15:44 +0100)]
RELEASE-NOTES: added missing bug ref

10 years agoaxtls: fix compiler warning on conversion ssize_t => int
Fabian Frank [Mon, 20 Jan 2014 23:53:44 +0000 (15:53 -0800)]
axtls: fix compiler warning on conversion ssize_t => int

10 years agoSFTP: stat remote file also when CURLOPT_NOBODY is 1
Fabian Frank [Mon, 20 Jan 2014 21:14:04 +0000 (13:14 -0800)]
SFTP: stat remote file also when CURLOPT_NOBODY is 1

Make it possible to call
curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &filesize)
and related functions on remote sftp:// files, without downloading them.

Reported-by: Yingwei Liu
Bug: http://curl.haxx.se/mail/lib-2014-01/0139.html

10 years agoRELEASE-NOTES: synced with 12ecd56da77
Daniel Stenberg [Mon, 20 Jan 2014 16:08:46 +0000 (17:08 +0100)]
RELEASE-NOTES: synced with 12ecd56da77

10 years agocontributors.sh: output list RELEASE-NOTES formatted
Daniel Stenberg [Mon, 20 Jan 2014 16:08:08 +0000 (17:08 +0100)]
contributors.sh: output list RELEASE-NOTES formatted

10 years agotest1514: added - no more negative Content-Length (HTTP POST)
Cédric Deltheil [Sun, 19 Jan 2014 22:25:32 +0000 (23:25 +0100)]
test1514: added - no more negative Content-Length (HTTP POST)

This covers changes from commit afd288b2.

10 years agoHTTP POST: omit Content-Length if data size is unknown
Cédric Deltheil [Sun, 19 Jan 2014 22:24:03 +0000 (23:24 +0100)]
HTTP POST: omit Content-Length if data size is unknown

This prevents sending a `Content-Length: -1` header, e.g this ocurred
with the following combination:

* standard HTTP POST (no chunked encoding),
* user-defined read function set,
* `CURLOPT_POSTFIELDSIZE(_LARGE)` NOT set.

With this fix it now behaves like HTTP PUT.

10 years agodisable GnuTLS insecure ciphers
Fabian Frank [Sun, 19 Jan 2014 08:47:31 +0000 (00:47 -0800)]
disable GnuTLS insecure ciphers

Make GnuTLS old and new consistent, specify the desired protocol, cipher
and certificate type in always in both modes. Disable insecure ciphers
as reported by howsmyssl.com. Honor not only --sslv3, but also the
--tlsv1[.N] switches.

Related Bug: http://curl.haxx.se/bug/view.cgi?id=1323

10 years agocurl_getdate.3: edited, removed references to pre 7.12.2 functionality
Daniel Stenberg [Sun, 19 Jan 2014 23:02:33 +0000 (00:02 +0100)]
curl_getdate.3: edited, removed references to pre 7.12.2 functionality

10 years agogtls: fix compiler warnings on conversions size_t => unsigned int
Daniel Stenberg [Sun, 19 Jan 2014 22:26:01 +0000 (23:26 +0100)]
gtls: fix compiler warnings on conversions size_t => unsigned int

10 years agotool: Fixed incorrect return code if password prompting runs out of memory
Steve Holme [Sun, 19 Jan 2014 16:14:09 +0000 (16:14 +0000)]
tool: Fixed incorrect return code if password prompting runs out of memory

Due to the changes in commit 3c929ff9f6ea and lack of subsequent
updates, curl could return a CURLE_FTP_ACCEPT_FAILED error if
checkpasswd() ran out of memory in versions 7.33.0 and 7.34.0.

Updated the function declaration and return code to return
CURLE_OUT_OF_MEMORY and CURLE_OK where appropriate.

10 years agoRELEASE-NOTES: Synced with 2cac75c4e400
Steve Holme [Sun, 19 Jan 2014 13:57:03 +0000 (13:57 +0000)]
RELEASE-NOTES: Synced with 2cac75c4e400

10 years agohttp_chunks.c: Fixed compilation warnings under some 32-bit systems
Steve Holme [Sun, 19 Jan 2014 13:04:59 +0000 (13:04 +0000)]
http_chunks.c: Fixed compilation warnings under some 32-bit systems

conversion from 'curl_off_t' to 'size_t', possible loss of data

Where curl_off_t is a 64-bit word and size_t is 32-bit - for example
with 32-bit Windows builds.

10 years agotool: Fixed incorrect return code if command line parser runs out of memory
Steve Holme [Sun, 19 Jan 2014 12:20:01 +0000 (12:20 +0000)]
tool: Fixed incorrect return code if command line parser runs out of memory

In the rare instance where getparameter() may return PARAM_NO_MEM whilst
parsing a URL, cURL would return this error code, which is equivalent to
CURLE_FTP_ACCEPT_FAILED in cURL error codes terms.

Instead, return CURLE_FAILED_INIT and output the failure reason as per
the other usage of getparameter().

10 years agoSubject: progress bar: increase update frequency to 10Hz
Tobias Markus [Sat, 18 Jan 2014 21:45:49 +0000 (22:45 +0100)]
Subject: progress bar: increase update frequency to 10Hz

Increasing the update frequency of the progress bar to 10Hz greatly
improves the visual appearance of the progress bar (at least in my
impression).

Signed-off-by: Tobias Markus <tobias@markus-regensburg.de>
10 years agoprogress bar: always update when at 100%
Tobias Markus [Mon, 6 Jan 2014 19:32:33 +0000 (20:32 +0100)]
progress bar: always update when at 100%

Currently, the progress bar is updated at 5Hz. Because it is often not
updated to 100% when the download is finished and curl exits, the bar
is often "stuck" at 90-something, thus irritating the user.

This patch fixes this by always updating the progress bar (instead of
waiting for 200ms to have elapsed) while the download is finished but
curl has not yet exited. This should not greatly affect performance
because that moment is rather short.

Signed-off-by: Tobias Markus <tobias@markus-regensburg.de>
10 years agowin32: Added additional preprocessor check for Version Helper API
Steve Holme [Fri, 17 Jan 2014 22:36:21 +0000 (22:36 +0000)]
win32: Added additional preprocessor check for Version Helper API

A follow up patch to commit d2671340a613 as _WIN32_WINNT_WIN2K and
_WIN32_WINNT_WIN2K may not be defined on all systems.

10 years agowin32: Corrected the preprocessor check for Version Helper API
Steve Holme [Fri, 17 Jan 2014 22:33:44 +0000 (22:33 +0000)]
win32: Corrected the preprocessor check for Version Helper API

Following some auto build failures after commit c7a76bb056f31e changed
the preprocessor check to use _WIN32_WINNT.

10 years agocookie: max-age fixes
Daniel Stenberg [Thu, 16 Jan 2014 07:51:30 +0000 (08:51 +0100)]
cookie: max-age fixes

1 - allow >31 bit max-age values

2 - don't overflow on extremely large max-age values when we add the
value to the current time

3 - make sure max-age takes precedence over expires as dictated by
RFC6265

Bug: http://curl.haxx.se/mail/lib-2014-01/0130.html
Reported-by: Chen Prog
10 years agotest1417: verify chunked-encoding transfer without CR
Daniel Stenberg [Thu, 16 Jan 2014 23:55:24 +0000 (00:55 +0100)]
test1417: verify chunked-encoding transfer without CR

As was introduced in 8f6b4be8af04

10 years agochunked parsing: relax the CR strictness
Daniel Stenberg [Thu, 16 Jan 2014 23:34:36 +0000 (00:34 +0100)]
chunked parsing: relax the CR strictness

Allow for chunked-encoding data to get parsed with only LF line endings.
This is allowed by browsers.

10 years agotest1416: verify the chunked size overflow detection
Daniel Stenberg [Thu, 16 Jan 2014 22:12:19 +0000 (23:12 +0100)]
test1416: verify the chunked size overflow detection

10 years agochunked-parser: abort on overflows, allow 64 bit chunks
Daniel Stenberg [Thu, 16 Jan 2014 22:07:54 +0000 (23:07 +0100)]
chunked-parser: abort on overflows, allow 64 bit chunks

10 years agoFixed some XML syntax issues in the test data
Dan Fandrich [Thu, 16 Jan 2014 22:41:31 +0000 (23:41 +0100)]
Fixed some XML syntax issues in the test data

Also, make the ftp server return a canned response that doesn't
cause XML verification problems.  Although the test file format
isn't technically XML, it's still handy to be able to use XML
tools to verify and manipulate them.

10 years agoconfigure: fix gssapi linking on HP-UX
Michael Osipov [Thu, 16 Jan 2014 16:19:00 +0000 (17:19 +0100)]
configure: fix gssapi linking on HP-UX

The issue is with HP-UX that is comes with HP flavor of MIT
Kerberos. This means that there is no krb5-config and the lib is called
libgss.so

Bug: http://curl.haxx.se/bug/view.cgi?id=1321

10 years agoCurl_cookie_add: remove 'now' from curl_getdate() call
Daniel Stenberg [Thu, 16 Jan 2014 07:37:29 +0000 (08:37 +0100)]
Curl_cookie_add: remove 'now' from curl_getdate() call

The now argument is unused by curl_getdate()

10 years agopop3-dele.c: Added missing CURLOPT_NOBODY following feedback
Steve Holme [Wed, 15 Jan 2014 23:29:16 +0000 (23:29 +0000)]
pop3-dele.c: Added missing CURLOPT_NOBODY following feedback

10 years agoconnect.c:942:84: warning: Longer than 79 columns
Daniel Stenberg [Wed, 15 Jan 2014 23:27:16 +0000 (00:27 +0100)]
connect.c:942:84: warning: Longer than 79 columns

10 years agoconnect.c: Corrected version compare in commit c7a76bb056f31e
Steve Holme [Wed, 15 Jan 2014 23:12:09 +0000 (23:12 +0000)]
connect.c: Corrected version compare in commit c7a76bb056f31e

10 years agoRELEASE-NOTES: Synced with c7a76bb056f31e
Steve Holme [Wed, 15 Jan 2014 21:44:34 +0000 (21:44 +0000)]
RELEASE-NOTES: Synced with c7a76bb056f31e

10 years agowin32: Fixed use of deprecated function 'GetVersionInfoEx' for VC12
Steve Holme [Wed, 15 Jan 2014 20:11:02 +0000 (20:11 +0000)]
win32: Fixed use of deprecated function 'GetVersionInfoEx' for VC12

Starting with Visual Studio 2013 (VC12) and Windows 8.1 the
GetVersionInfoEx() function has been marked as deprecated and it's
return value atered. Updated connect.c and curl_sspi.c to use
VerifyVersionInfo() where possible, which has been available since
Windows 2000.

10 years agocurl_easy_setopt.3: mention how to unset CURLOPT_INFILESIZE*
Daniel Stenberg [Tue, 14 Jan 2014 10:49:09 +0000 (11:49 +0100)]
curl_easy_setopt.3: mention how to unset CURLOPT_INFILESIZE*

10 years agoTODO: Allow SSL (HTTPS) to proxy
Daniel Stenberg [Tue, 14 Jan 2014 10:43:36 +0000 (11:43 +0100)]
TODO: Allow SSL (HTTPS) to proxy

10 years agoTODO: remove FTP proxy and more SSL libraries
Daniel Stenberg [Tue, 14 Jan 2014 10:41:51 +0000 (11:41 +0100)]
TODO: remove FTP proxy and more SSL libraries

10 years agoTODO: Detect when called from witin callbacks
Daniel Stenberg [Tue, 14 Jan 2014 06:42:52 +0000 (07:42 +0100)]
TODO: Detect when called from witin callbacks

10 years agosecureserver.pl: follow up fix for 87ade5f
Marc Hoersken [Mon, 13 Jan 2014 20:43:41 +0000 (21:43 +0100)]
secureserver.pl: follow up fix for 87ade5f

Since /dev/stdout is not always emulated on Windows,
just skip the output option on Windows.

MinGW/msys support /dev/stdout only from a new login shell.

10 years agoerror message: Sensible message on timeout when transfer size unknown
Colin Hogben [Mon, 13 Jan 2014 15:00:38 +0000 (15:00 +0000)]
error message: Sensible message on timeout when transfer size unknown

A transfer timeout could result in an error message such as "Operation
timed out after 3000 milliseconds with 19 bytes of -1 received".  This
patch removes the non-sensical "of -1" when the size of the transfer
is unknown, mirroring the logic in lib/transfer.c

10 years agosecureserver.pl: added full support for tstunnel on Windows
Marc Hoersken [Sun, 12 Jan 2014 23:09:46 +0000 (00:09 +0100)]
secureserver.pl: added full support for tstunnel on Windows

tstunnel on Windows does not support the pid option and is unable
to write to an output log that is already being used as a redirection
target for stdout. Therefore it does now output all log data to stdout
by default and secureserver.pl creates a fake pidfile on Windows.

10 years agoexamples: Fixed compilation errors
Steve Holme [Sun, 12 Jan 2014 18:42:32 +0000 (18:42 +0000)]
examples: Fixed compilation errors

error: 'MULTI_PERFORM_HANG_TIMEOUT' undeclared

10 years agoimap-multi.c: Corrected typo
Steve Holme [Sun, 12 Jan 2014 18:26:46 +0000 (18:26 +0000)]
imap-multi.c: Corrected typo

10 years agosmtp-multi.c: Minor coding style tidyup following POP3 and IMAP additions
Steve Holme [Sun, 12 Jan 2014 18:24:44 +0000 (18:24 +0000)]
smtp-multi.c: Minor coding style tidyup following POP3 and IMAP additions

10 years agoexamples: Added IMAP multi example
Steve Holme [Sun, 12 Jan 2014 18:18:18 +0000 (18:18 +0000)]
examples: Added IMAP multi example

10 years agopop3-multi.c: Corrected copy/paste typo
Steve Holme [Sun, 12 Jan 2014 18:06:06 +0000 (18:06 +0000)]
pop3-multi.c: Corrected copy/paste typo

10 years agoexamples: Added POP3 multi example
Steve Holme [Sun, 12 Jan 2014 18:01:01 +0000 (18:01 +0000)]
examples: Added POP3 multi example

10 years agoexamples: Added comments to SMTP multi example based on other MAIL examples
Steve Holme [Sun, 12 Jan 2014 16:44:59 +0000 (16:44 +0000)]
examples: Added comments to SMTP multi example based on other MAIL examples

10 years agoexamples: Removed user information and TLS setup from SMTP multi example
Steve Holme [Sun, 12 Jan 2014 16:32:48 +0000 (16:32 +0000)]
examples: Removed user information and TLS setup from SMTP multi example

Simplified the SMTP multi example as this example should demonstrate
the differences the easy and multi interfaces rather than introduce new
concepts such as user authentication and TLS which are shown in the TLS
and SSL examples.

10 years agoexamples: Updated SMTP MAIL example to return libcurl result code
Steve Holme [Sun, 12 Jan 2014 15:44:51 +0000 (15:44 +0000)]
examples: Updated SMTP MAIL example to return libcurl result code

10 years agoexamples: Synchronised comments between SMTP MAIL examples
Steve Holme [Sun, 12 Jan 2014 15:30:45 +0000 (15:30 +0000)]
examples: Synchronised comments between SMTP MAIL examples

10 years agoexamples: Updated SMTP MAIL example to use a read function for data
Steve Holme [Sun, 12 Jan 2014 15:20:25 +0000 (15:20 +0000)]
examples: Updated SMTP MAIL example to use a read function for data

Updated to read data from a callback rather than from stdio as this is
more realistic to most use cases.

10 years agoOpenSSL: deselect weak ciphers by default
Daniel Stenberg [Fri, 10 Jan 2014 23:05:19 +0000 (00:05 +0100)]
OpenSSL: deselect weak ciphers by default

By default even recent versions of OpenSSL support and accept both
"export strength" ciphers, small-bitsize ciphers as well as downright
deprecated ones.

This change sets a default cipher set that avoids the worst ciphers, and
subsequently makes https://www.howsmyssl.com/a/check no longer grade
curl/OpenSSL connects as 'Bad'.

Bug: http://curl.haxx.se/bug/view.cgi?id=1323
Reported-by: Jeff Hodges
10 years agomulti: remove MULTI_TIMEOUT_INACCURACY
Daniel Stenberg [Sun, 5 Jan 2014 15:38:18 +0000 (16:38 +0100)]
multi: remove MULTI_TIMEOUT_INACCURACY

With the recently added timeout "reminder" functionality, there's no
reason left for us to execute timeout code before the time is
ripe. Simplifies the handling too.

This will make the *TIMEOUT and *CONNECTTIMEOUT options more accurate
again, which probably is most important when the *_MS versions are used.

In multi_socket, make sure to update 'now' after having handled activity
on a socket.

10 years agoMakefile.dist: Added support for VC7
Steve Holme [Sat, 11 Jan 2014 14:33:33 +0000 (14:33 +0000)]
Makefile.dist: Added support for VC7

Currently VC7 and VC7.1 builds have to be ran with the VC variable set
to vc6 which is not only inconsistent with the nmake winbuild system
but also with newer versions of Visual Studio supported by this file.

Note: This doesn't break the build for anyone still running with the
VC variable set to vc6 or not set (which defaults to vc6).

10 years agoRELEASE-NOTES: Synced with 980659a2caa285
Steve Holme [Fri, 10 Jan 2014 20:04:27 +0000 (20:04 +0000)]
RELEASE-NOTES: Synced with 980659a2caa285

10 years agomulti_socket: remind app if timeout didn't run
Daniel Stenberg [Wed, 8 Jan 2014 07:23:13 +0000 (08:23 +0100)]
multi_socket: remind app if timeout didn't run

BACKGROUND:

We have learned that on some systems timeout timers are inaccurate and
might occasionally fire off too early. To make the multi_socket API work
with this, we made libcurl execute timeout actions a bit early too if
they are within our MULTI_TIMEOUT_INACCURACY. (added in commit
2c72732ebf, present since 7.21.0)

Switching everything to the multi API made this inaccuracy problem
slightly more notable as now everyone can be affected.

Recently (commit 21091549c02) we tweaked that inaccuracy value to make
timeouts more accurate and made it platform specific. We also figured
out that we have code at places that check for fixed timeout values so
they MUST NOT run too early as then they will not trigger at all (see
commit be28223f35 and a691e044705) - so there are definitately problems
with running timeouts before they're supposed to run. (We've handled
that so far by adding the inaccuracy margin to those specific timeouts.)

The libcurl multi_socket API tells the application with a callback that
a timeout expires in N milliseconds (and it explicitly will not tell it
again for the same timeout), and the application is then supposed to
call libcurl when that timeout expires. When libcurl subsequently gets
called with curl_multi_socket_action(...CURL_SOCKET_TIMEOUT...), it
knows that the application thinks the timeout expired - and alas, if it
is within the inaccuracy level libcurl will run code handling that
handle.

If the application says CURL_SOCKET_TIMEOUT to libcurl and _isn't_
within the inaccuracy level, libcurl will not consider the timeout
expired and it will not tell the application again since the timeout
value is still the same.

NOW:

This change introduces a modified behavior here. If the application says
CURL_SOCKET_TIMEOUT and libcurl finds no timeout code to run, it will
inform the application about the timeout value - *again* even if it is
the same timeout that it already told about before (although libcurl
will of course tell it the updated time so that it'll still get the
correct remaining time). This way, we will not risk that the application
believes it has done its job and libcurl thinks the time hasn't come yet
to run any code and both just sit waiting. This also allows us to
decrease the MULTI_TIMEOUT_INACCURACY margin, but that will be handled
in a separate commit.

A repeated timeout update to the application risk that the timeout will
then fire again immediately and we have what basically is a busy-loop
until the time is fine even for libcurl. If that becomes a problem, we
need to address it.

10 years agothreaded-resolver: never use NULL hints with getaddrinfo
Daniel Stenberg [Fri, 10 Jan 2014 07:37:43 +0000 (08:37 +0100)]
threaded-resolver: never use NULL hints with getaddrinfo

The net effect of this bug as it appeared to users, would be that
libcurl would timeout in the connect phase.

When disabling IPv6 use but still using getaddrinfo, libcurl would
wrongly not init the "hints" struct field in init_thread_sync() which
would subsequently lead to a getaddrinfo() invoke with a zeroed hints
with ai_socktype set to 0 instead of SOCK_STREAM. This would lead to
different behaviors on different platforms but basically incorrect
output.

This code was introduced in 483ff1ca75cbea, released in curl 7.20.0.

This bug became a problem now due to the happy eyeballs code and how
libcurl now traverses the getaddrinfo() results differently.

Bug: http://curl.haxx.se/mail/lib-2014-01/0061.html
Reported-by: Fabian Frank
Debugged-by: Fabian Frank
10 years agodarwinssl: un-break Leopard build after PKCS#12 change
Nick Zitzmann [Thu, 9 Jan 2014 23:53:29 +0000 (17:53 -0600)]
darwinssl: un-break Leopard build after PKCS#12 change

It turns out errSecDecode wasn't defined in Leopard's headers. So
we use the enum's value instead.

Bug: http://curl.haxx.se/mail/lib-2013-12/0150.html
Reported by: Abram Pousada

10 years agoCurl_updateconninfo: don't do anything for UDP "connections"
Daniel Stenberg [Wed, 8 Jan 2014 22:37:27 +0000 (23:37 +0100)]
Curl_updateconninfo: don't do anything for UDP "connections"

getpeername() doesn't work for UDP sockets since they're not connected

Reported-by: Priyanka Shah
Bug: http://curl.haxx.se/mail/archive-2014-01/0016.html

10 years agoinfo: remove debug output
Daniel Stenberg [Wed, 8 Jan 2014 22:19:57 +0000 (23:19 +0100)]
info: remove debug output

Removed some of the infof() calls that were added with the recent
pipeline improvements but they're not useful to the vast majority of
readers and the pipelining seems to fundamentaly work - the debugging
outputs can easily be added there if debugging these functions is needed
again.

10 years agoruntests: disable memory tracking with threaded resolver
Daniel Stenberg [Wed, 8 Jan 2014 12:20:29 +0000 (13:20 +0100)]
runtests: disable memory tracking with threaded resolver

The built-in memory debug system doesn't work with multi-threaded use so
instead of causing annoying false positives, disable the memory tracking
if the threaded resolver is used.

10 years agotrynextip: fix build for non-IPV6 capable systems
Daniel Stenberg [Wed, 8 Jan 2014 08:41:02 +0000 (09:41 +0100)]
trynextip: fix build for non-IPV6 capable systems

AF_INET6 may not exist then

Patched-by: Iida Yosiaki
Bug: http://curl.haxx.se/bug/view.cgi?id=1322

10 years agomakefile: Added support for VC12
Steve Holme [Wed, 8 Jan 2014 00:30:33 +0000 (00:30 +0000)]
makefile: Added support for VC12

10 years agomakefile: Added support for VC11
Steve Holme [Wed, 8 Jan 2014 00:15:30 +0000 (00:15 +0000)]
makefile: Added support for VC11

10 years agowinbuild: Follow up fix for a47c142a88c0, 11e8066ef956 and 92b9ae5c5d59
Steve Holme [Wed, 8 Jan 2014 12:05:48 +0000 (12:05 +0000)]
winbuild: Follow up fix for a47c142a88c011e8066ef956 and 92b9ae5c5d59

10 years agomk-ca-bundle.1: document -d
Daniel Stenberg [Tue, 7 Jan 2014 22:51:01 +0000 (23:51 +0100)]
mk-ca-bundle.1: document -d

10 years agoRELEASE-NOTES: Synced with 8ae35102c43d8d
Steve Holme [Tue, 7 Jan 2014 22:12:57 +0000 (22:12 +0000)]
RELEASE-NOTES: Synced with 8ae35102c43d8d

10 years agoConnectionExists: fix NTLM check for new connection
Daniel Stenberg [Tue, 7 Jan 2014 08:33:54 +0000 (09:33 +0100)]
ConnectionExists: fix NTLM check for new connection

When the requested authentication bitmask includes NTLM, we cannot
re-use a connection for another username/password as we then risk
re-using NTLM (connection-based auth).

This has the unfortunate downside that if you include NTLM as a possible
auth, you cannot re-use connections for other usernames/passwords even
if NTLM doesn't end up the auth type used.

Reported-by: Paras S
Patched-by: Paras S
Bug: http://curl.haxx.se/mail/lib-2014-01/0046.html

10 years agoexamples: Added required libcurl version information to SMTP examples
Steve Holme [Sun, 5 Jan 2014 22:59:29 +0000 (22:59 +0000)]
examples: Added required libcurl version information to SMTP examples

10 years agomk-ca-bundle.pl: avoid warnings with -d without parameter
Daniel Stenberg [Sun, 5 Jan 2014 22:53:26 +0000 (23:53 +0100)]
mk-ca-bundle.pl: avoid warnings with -d without parameter

10 years agomk-ca-bundle: introduces -d and warns about using this script
Leif W [Sun, 5 Jan 2014 22:37:26 +0000 (23:37 +0100)]
mk-ca-bundle: introduces -d and warns about using this script

10 years agoMakefile: Added missing WinSSL and x64 configurations
Steve Holme [Sun, 5 Jan 2014 21:13:12 +0000 (21:13 +0000)]
Makefile: Added missing WinSSL and x64 configurations

10 years agodocs/INTERNALS: follow up fix for 11e8066 and 92b9ae5
Marc Hoersken [Sun, 5 Jan 2014 19:17:04 +0000 (20:17 +0100)]
docs/INTERNALS: follow up fix for 11e8066 and 92b9ae5

10 years agopackages: follow up fix for a47c142, 11e8066 and 92b9ae5
Marc Hoersken [Sun, 5 Jan 2014 19:13:55 +0000 (20:13 +0100)]
packages: follow up fix for a47c142, 11e8066 and 92b9ae5

10 years agomulti.c: fix possible dereference of null pointer
Marc Hoersken [Sun, 5 Jan 2014 19:01:33 +0000 (20:01 +0100)]
multi.c: fix possible dereference of null pointer

10 years agoExamples: Renamed SMTP MAIL example to match other email examples
Steve Holme [Sun, 5 Jan 2014 17:50:14 +0000 (17:50 +0000)]
Examples: Renamed SMTP MAIL example to match other email examples

10 years agoexamples: Added POP3 TLS example
Steve Holme [Sun, 5 Jan 2014 14:40:58 +0000 (14:40 +0000)]
examples: Added POP3 TLS example

10 years agoexamples: Added IMAP NOOP example
Steve Holme [Sun, 5 Jan 2014 14:21:45 +0000 (14:21 +0000)]
examples: Added IMAP NOOP example

10 years agoexamples: Added POP3 NOOP example
Steve Holme [Sun, 5 Jan 2014 14:02:44 +0000 (14:02 +0000)]
examples: Added POP3 NOOP example

10 years agopop3-stat.c: Corrected small typo from commit 91d62e9abd761c
Steve Holme [Sun, 5 Jan 2014 13:46:16 +0000 (13:46 +0000)]
pop3-stat.c: Corrected small typo from commit 91d62e9abd761c

10 years agoexamples: Added POP3 STAT example
Steve Holme [Sun, 5 Jan 2014 13:40:55 +0000 (13:40 +0000)]
examples: Added POP3 STAT example

10 years agoexamples: Added POP3 TOP example
Steve Holme [Sun, 5 Jan 2014 13:20:40 +0000 (13:20 +0000)]
examples: Added POP3 TOP example

10 years agoexamples: Added POP3 DELE example
Steve Holme [Sun, 5 Jan 2014 13:00:18 +0000 (13:00 +0000)]
examples: Added POP3 DELE example

10 years agoexamples: Added POP3 UIDL example
Steve Holme [Sun, 5 Jan 2014 12:40:50 +0000 (12:40 +0000)]
examples: Added POP3 UIDL example

10 years agoexamples: Added POP3 RETR example
Steve Holme [Sun, 5 Jan 2014 12:20:26 +0000 (12:20 +0000)]
examples: Added POP3 RETR example

10 years agoexamples: Added return of error code in POP3 examples
Steve Holme [Sun, 5 Jan 2014 11:55:10 +0000 (11:55 +0000)]
examples: Added return of error code in POP3 examples

10 years agoruntests.pl: Updated copyright year after edit from d718abd968aeb4
Steve Holme [Sun, 5 Jan 2014 11:22:39 +0000 (11:22 +0000)]
runtests.pl: Updated copyright year after edit from d718abd968aeb4