]> granicus.if.org Git - curl/log
curl
8 years agoaxtls: Use Curl_wait_ms instead of the less-portable usleep
Dan Fandrich [Thu, 16 Jun 2016 06:44:08 +0000 (08:44 +0200)]
axtls: Use Curl_wait_ms instead of the less-portable usleep

8 years agoaxtls: Fixed compile after compile 31c521b0
Dan Fandrich [Thu, 16 Jun 2016 06:29:10 +0000 (08:29 +0200)]
axtls: Fixed compile after compile 31c521b0

8 years agotests: Added HTTP proxy keywords to tests 1141 & 1142
Dan Fandrich [Wed, 15 Jun 2016 21:04:48 +0000 (23:04 +0200)]
tests: Added HTTP proxy keywords to tests 1141 & 1142

8 years agocmake: Fix build with winldap
Sergei Nikulov [Tue, 14 Jun 2016 14:11:48 +0000 (17:11 +0300)]
cmake: Fix build with winldap

Bug: https://github.com/curl/curl/pull/874
Reported-by: Sergei Nikulov
8 years agoCURLOPT_POSTFIELDS.3: Clarify what happens when set empty
Jay Satiro [Sat, 11 Jun 2016 21:33:16 +0000 (17:33 -0400)]
CURLOPT_POSTFIELDS.3: Clarify what happens when set empty

When CURLOPT_POSTFIELDS is set to an empty string libcurl will send a
zero-byte POST. Prior to this change it was documented as sending data
from the read callback.

This also changes the wording of what happens when empty or NULL so that
it's hopefully easier to understand for people whose primary language
isn't English.

Bug: https://github.com/curl/curl/issues/862
Reported-by: Askar Safin
8 years agocurl_multi_socket_action.3: Fix rewording
Michael Wallner [Tue, 7 Jun 2016 05:51:34 +0000 (07:51 +0200)]
curl_multi_socket_action.3: Fix rewording

- Remove some erroneous text.

Closes https://github.com/curl/curl/pull/865

8 years agoresolve: enable protocol family logic for synthesized IPv6
Luo Jinghua [Tue, 7 Jun 2016 23:23:54 +0000 (07:23 +0800)]
resolve: enable protocol family logic for synthesized IPv6

- Enable protocol family logic for IPv6 resolves even when support
for synthesized addresses is enabled.

This is a follow up to the parent commit that added support for
synthesized IPv6 addresses from IPv4 on iOS/OS X. The protocol family
logic needed for IPv6 was inadvertently excluded if support for
synthesized addresses was enabled.

Bug: https://github.com/curl/curl/issues/863
Ref: https://github.com/curl/curl/pull/866
Ref: https://github.com/curl/curl/pull/867

8 years agoresolve: add support for IPv6 DNS64/NAT64 Networks on OS X + iOS
Luo Jinghua [Tue, 7 Jun 2016 10:11:37 +0000 (18:11 +0800)]
resolve: add support for IPv6 DNS64/NAT64 Networks on OS X + iOS

Use getaddrinfo() to resolve the IPv4 address literal on iOS/Mac OS X.
If the current network interface doesn’t support IPv4, but supports
IPv6, NAT64, and DNS64.

Closes #866
Fixes #863

8 years agotests: two more HTTP/2 tests
Daniel Stenberg [Sun, 5 Jun 2016 09:28:31 +0000 (11:28 +0200)]
tests: two more HTTP/2 tests

1701 and 1702

8 years agoruntests: don't display logs when http2 server fails to start
Daniel Stenberg [Sun, 5 Jun 2016 09:17:29 +0000 (11:17 +0200)]
runtests: don't display logs when http2 server fails to start

8 years agoruntests: make stripfile work on stdout as well
Daniel Stenberg [Fri, 3 Jun 2016 21:54:06 +0000 (23:54 +0200)]
runtests: make stripfile work on stdout as well

... and have test 1700 use that to strip out the nghttpx server: headers

8 years agohttp2-tests: test1700 is the first real HTTP/2 test
Daniel Stenberg [Fri, 3 Jun 2016 21:36:10 +0000 (23:36 +0200)]
http2-tests: test1700 is the first real HTTP/2 test

It requires that 'nghttpx' is in the PATH, and it will run the tests
using nghttpx as a front-end proxy in front of the standard HTTP/1 test
server. This uses HTTP/2 over plain TCP.

If you like me have nghttpx installed in a custom path, you can run test 1700
like this:

$ PATH=$PATH:$HOME/build-nghttp2/bin/ ./runtests.pl 1700

8 years agoRELEASE-NOTES: synced with 34855feeb4c299
Daniel Stenberg [Mon, 6 Jun 2016 21:23:44 +0000 (23:23 +0200)]
RELEASE-NOTES: synced with 34855feeb4c299

8 years agoschannel: Disable ALPN on Windows < 8.1
Steve Holme [Mon, 6 Jun 2016 19:53:30 +0000 (20:53 +0100)]
schannel: Disable ALPN on Windows < 8.1

Calling QueryContextAttributes with SECPKG_ATTR_APPLICATION_PROTOCOL
fails on Windows < 8.1 so we need to disable ALPN on these OS versions.

Inspiration provide by: Daniel Seither

Closes #848
Fixes #840

8 years agochecksrc: Add LoadLibrary to the banned functions list
Jay Satiro [Mon, 6 Jun 2016 01:07:03 +0000 (21:07 -0400)]
checksrc: Add LoadLibrary to the banned functions list

LoadLibrary was supplanted by Curl_load_library for security
reasons in 6df916d.

8 years agohttp: Fix HTTP/2 connection reuse
Jay Satiro [Sun, 5 Jun 2016 07:13:32 +0000 (03:13 -0400)]
http: Fix HTTP/2 connection reuse

- Change the parser to not require a minor version for HTTP/2.

HTTP/2 connection reuse broke when we changed from HTTP/2.0 to HTTP/2
in 8243a95 because the parser still expected a minor version.

Bug: https://github.com/curl/curl/issues/855
Reported-by: Andrew Robbins, Frank Gevaerts
8 years agoconnect.c: Fixed compilation warning from commit 332e8d6164
Steve Holme [Sat, 4 Jun 2016 20:52:08 +0000 (21:52 +0100)]
connect.c: Fixed compilation warning from commit 332e8d6164

connect.c:952:5: warning: suggest explicit braces to avoid ambiguous 'else'

8 years agowin32: Used centralised verify windows version function
Steve Holme [Sat, 4 Jun 2016 19:58:39 +0000 (20:58 +0100)]
win32: Used centralised verify windows version function

Closes #845

8 years agowin32: Added verify windows version functionality
Steve Holme [Sat, 4 Jun 2016 19:51:32 +0000 (20:51 +0100)]
win32: Added verify windows version functionality

8 years agowin32: Introduced centralised verify windows version function
Steve Holme [Sat, 4 Jun 2016 19:06:56 +0000 (20:06 +0100)]
win32: Introduced centralised verify windows version function

8 years agotool_urlglob: fix off-by-one error in glob_parse()
Kamil Dudka [Fri, 3 Jun 2016 09:26:20 +0000 (11:26 +0200)]
tool_urlglob: fix off-by-one error in glob_parse()

... causing SIGSEGV while parsing URL with too many globs.
Minimal example:

$ curl $(for i in $(seq 101); do printf '{a}'; done)

Reported-by: Romain Coltel
Bug: https://bugzilla.redhat.com/1340757

8 years agolibcurl-multi.3: fix small typo
Benjamin Kircher [Wed, 1 Jun 2016 17:02:18 +0000 (19:02 +0200)]
libcurl-multi.3: fix small typo

Closes #850

8 years agomakefile.m32: add crypt32 for winssl builds
Viktor Szakats [Wed, 1 Jun 2016 08:35:38 +0000 (10:35 +0200)]
makefile.m32: add crypt32 for winssl builds

Dependency added by 6cabd78

Closes #849

8 years agovtls: fix ssl session cache race condition
Ivan Avdeev [Wed, 1 Jun 2016 07:30:03 +0000 (09:30 +0200)]
vtls: fix ssl session cache race condition

Sessionid cache management is inseparable from managing individual
session lifetimes. E.g. for reference-counted sessions (like those in
SChannel and OpenSSL engines) every session addition and removal
should be accompanied with refcount increment and decrement
respectively. Failing to do so synchronously leads to a race condition
that causes symptoms like use-after-free and memory corruption.
This commit:
 - makes existing session cache locking explicit, thus allowing
   individual engines to manage lock's scope.
 - fixes OpenSSL and SChannel engines by putting refcount management
   inside this lock's scope in relevant places.
 - adds these explicit locking calls to other engines that use
   sessionid cache to accommodate for this change. Note, however,
   that it is unknown whether any of these engines could also have
   this race.

Bug: https://github.com/curl/curl/issues/815
Fixes #815
Closes #847

8 years agoschannel: add CURLOPT_CERTINFO support
Andrew Kurushin [Wed, 1 Jun 2016 06:48:30 +0000 (08:48 +0200)]
schannel: add CURLOPT_CERTINFO support

Closes #822

8 years agoRELEASE-NOTES: synced with 142ee9fa15002315
Daniel Stenberg [Tue, 31 May 2016 21:33:48 +0000 (23:33 +0200)]
RELEASE-NOTES: synced with 142ee9fa15002315

8 years agoopenssl: rename the private SSL_strerror
Daniel Stenberg [Tue, 31 May 2016 17:54:35 +0000 (19:54 +0200)]
openssl: rename the private SSL_strerror

... to make it not look like an OpenSSL function

8 years agoopenssl: Use correct buffer sizes for error messages
Michael Kaufmann [Tue, 31 May 2016 14:25:56 +0000 (16:25 +0200)]
openssl: Use correct buffer sizes for error messages

Closes #844

8 years agocurl: fix -q [regression]
Daniel Stenberg [Tue, 31 May 2016 12:13:33 +0000 (14:13 +0200)]
curl: fix -q [regression]

This broke in 7.49.0 with commit e200034425a7625

Fixes #842

8 years agoURL parser: allow URLs to use one, two or three slashes
Daniel Stenberg [Sun, 8 May 2016 13:11:10 +0000 (15:11 +0200)]
URL parser: allow URLs to use one, two or three slashes

Mostly in order to support broken web sites that redirect to broken URLs
that are accepted by browsers.

Browsers are typically even more leniant than this as the WHATWG URL
spec they should allow an _infinite_ amount. I tested 8000 slashes with
Firefox and it just worked.

Added test case 1141, 1142 and 1143 to verify the new parser.

Closes #791

8 years agocmake: Added missing mbedTLS support
Renaud Lehoux [Mon, 30 May 2016 15:26:10 +0000 (17:26 +0200)]
cmake: Added missing mbedTLS support

Closes #837

8 years agombedtls: removed unused variables
Renaud Lehoux [Mon, 30 May 2016 16:10:23 +0000 (18:10 +0200)]
mbedtls: removed unused variables

Closes #838

8 years agohttp: add CURLINFO_HTTP_VERSION and %{http_version}
Frank Gevaerts [Wed, 11 May 2016 12:23:37 +0000 (14:23 +0200)]
http: add CURLINFO_HTTP_VERSION and %{http_version}

Adds access to the effectively used http version to both libcurl and
curl.

Closes #799

8 years agobump: start the journey toward 7.50.0
Daniel Stenberg [Mon, 30 May 2016 20:55:54 +0000 (22:55 +0200)]
bump: start the journey toward 7.50.0

8 years agoopenssl: fix build with OPENSSL_NO_COMP
Marcel Raad [Mon, 30 May 2016 11:26:20 +0000 (13:26 +0200)]
openssl: fix build with OPENSSL_NO_COMP

With OPENSSL_NO_COMP defined, there is no function
SSL_COMP_free_compression_methods

Closes #836

8 years agomemdebug: fix MSVC crash with -DMEMDEBUG_LOG_SYNC
Gisle Vanem [Mon, 30 May 2016 09:43:04 +0000 (11:43 +0200)]
memdebug: fix MSVC crash with -DMEMDEBUG_LOG_SYNC

Fixes #828

8 years agoREADME.md: polish
Jonathan [Mon, 30 May 2016 08:46:35 +0000 (10:46 +0200)]
README.md: polish

Closes #834

8 years agoRELEASE-NOTES: fix vuln link
Daniel Stenberg [Mon, 30 May 2016 06:21:16 +0000 (08:21 +0200)]
RELEASE-NOTES: fix vuln link

8 years agoRELEASE-NOTES: 7.49.1 curl-7_49_1
Daniel Stenberg [Fri, 27 May 2016 14:58:43 +0000 (16:58 +0200)]
RELEASE-NOTES: 7.49.1

8 years agoloadlibrary: Only load system DLLs from the system directory
Steve Holme [Sun, 29 May 2016 20:57:40 +0000 (22:57 +0200)]
loadlibrary: Only load system DLLs from the system directory

Inspiration provided by: Daniel Stenberg and Ray Satiro

Bug: https://curl.haxx.se/docs/adv_20160530.html

Ref: Windows DLL hijacking with curl, CVE-2016-4802

8 years agossh: fix version number check typo
Daniel Stenberg [Mon, 30 May 2016 06:14:13 +0000 (08:14 +0200)]
ssh: fix version number check typo

8 years agocurl_share_setopt.3: Add min ver needed for ssl session lock
Jay Satiro [Sun, 29 May 2016 20:27:44 +0000 (16:27 -0400)]
curl_share_setopt.3: Add min ver needed for ssl session lock

Bug: https://github.com/curl/curl/issues/826
Reported-by: Michael Wallner
8 years agossh: fix build for libssh2 before 1.2.6
Daniel Stenberg [Sat, 28 May 2016 22:20:14 +0000 (00:20 +0200)]
ssh: fix build for libssh2 before 1.2.6

The statvfs functionality was added to libssh2 in that version, so we
switch off that functionality when built with older libraries.

Fixes #831

8 years agombedtls: fix includes so snprintf() works
Daniel Stenberg [Tue, 24 May 2016 10:14:18 +0000 (12:14 +0200)]
mbedtls: fix includes so snprintf() works

Regression from the previous *printf() rearrangements, this file missed to
include the correct header to make sure snprintf() works universally.

Reported-by: Moti Avrahami
Bug: https://curl.haxx.se/mail/lib-2016-05/0196.html

8 years agochecksrc.pl: Added variants of strcat() & strncat() to banned function list
Steve Holme [Mon, 23 May 2016 11:13:41 +0000 (12:13 +0100)]
checksrc.pl: Added variants of strcat() & strncat() to banned function list

Added support for checking the tchar, unicode and mbcs variants of
strcat() and strncat() in the banned function list.

8 years agosmtp: minor ident (white space) fixes
Daniel Stenberg [Mon, 23 May 2016 10:59:58 +0000 (12:59 +0200)]
smtp: minor ident (white space) fixes

8 years agoTHANKS: updated after script fixes
Daniel Stenberg [Mon, 23 May 2016 08:08:34 +0000 (10:08 +0200)]
THANKS: updated after script fixes

Now giving credit properly to github user names, fixed some UTF-8 issues
and added names discovered when contrithanks was improved.

8 years agoTHANKS-filter: more name cleanups
Daniel Stenberg [Mon, 23 May 2016 08:08:15 +0000 (10:08 +0200)]
THANKS-filter: more name cleanups

8 years agocontrithanks.sh: exclude existing names case insensitively
Daniel Stenberg [Mon, 23 May 2016 08:07:48 +0000 (10:07 +0200)]
contrithanks.sh: exclude existing names case insensitively

8 years agocontrithanks.sh: use same grep pattern and -a flag as contributors.sh
Daniel Stenberg [Mon, 23 May 2016 07:14:19 +0000 (09:14 +0200)]
contrithanks.sh: use same grep pattern and -a flag as contributors.sh

8 years agocontributors.sh: better grep pattern, use grep -a
Daniel Stenberg [Mon, 23 May 2016 07:13:43 +0000 (09:13 +0200)]
contributors.sh: better grep pattern, use grep -a

8 years agoTHANKS-filter: fix more names
Daniel Stenberg [Mon, 23 May 2016 07:13:20 +0000 (09:13 +0200)]
THANKS-filter: fix more names

8 years agocontrithanks.sh: do the same github fix as contributors.sh
Daniel Stenberg [Mon, 23 May 2016 06:50:53 +0000 (08:50 +0200)]
contrithanks.sh: do the same github fix as contributors.sh

from 1577bfa35ba

8 years agocontributors: Show GitHub username if real name unknown
Jay Satiro [Mon, 23 May 2016 06:42:12 +0000 (02:42 -0400)]
contributors: Show GitHub username if real name unknown

Prior to this change if a GitHub contributor's real name was unknown
they would be omitted from the list.

Bug: https://github.com/curl/curl/issues/824

8 years agoRELEASE-NOTES: synced with 3caaeffbe8ded4
Daniel Stenberg [Sat, 21 May 2016 14:05:54 +0000 (16:05 +0200)]
RELEASE-NOTES: synced with 3caaeffbe8ded4

8 years agoopenssl: cleanup must free compression methods
Jay Satiro [Fri, 20 May 2016 20:44:01 +0000 (16:44 -0400)]
openssl: cleanup must free compression methods

- Free compression methods if OpenSSL 1.0.2 to avoid a memory leak.

Bug: https://github.com/curl/curl/issues/817
Reported-by: jveazey@users.noreply.github.com
8 years agocurl_multibyte: fix compiler error
Gisle Vanem [Fri, 20 May 2016 14:50:04 +0000 (16:50 +0200)]
curl_multibyte: fix compiler error

While compiling lib/curl_multibyte.c with '-DUSE_WIN32_IDN' etc. I was
getting:

f:\mingw32\src\inet\curl\lib\memdebug.h(38): error C2054: expected '('
to follow 'CURL_EXTERN'

f:\mingw32\src\inet\curl\lib\memdebug.h(38): error C2085:
'curl_domalloc': not in formal parameter list

8 years agoTHANKS-filter: make Jan-E get proper credit
Daniel Stenberg [Fri, 20 May 2016 14:44:34 +0000 (16:44 +0200)]
THANKS-filter: make Jan-E get proper credit

8 years agowinbuild/Makefile.vc: Fix check on SSL, MBEDTLS, WINSSL exclusivity
Jan-E [Thu, 19 May 2016 20:35:50 +0000 (22:35 +0200)]
winbuild/Makefile.vc: Fix check on SSL, MBEDTLS, WINSSL exclusivity

Closes #818

8 years agolibcurl.m4: Avoid obsolete warning
Alexander Traud [Fri, 20 May 2016 12:57:48 +0000 (14:57 +0200)]
libcurl.m4: Avoid obsolete warning

Closes #821

8 years agoCURLOPT_CONNECT_TO.3: user must not free the list prematurely
Michael Kaufmann [Thu, 19 May 2016 22:06:40 +0000 (00:06 +0200)]
CURLOPT_CONNECT_TO.3: user must not free the list prematurely

The connect-to list isn't copied so as long as the handle may be used
for a transfer the list must be valid.

Bug: https://github.com/curl/curl/pull/819
Reported-by: Michael Kaufmann
8 years agoRELEASE-NOTES: synced with 48114a8634242c
Daniel Stenberg [Thu, 19 May 2016 12:01:30 +0000 (14:01 +0200)]
RELEASE-NOTES: synced with 48114a8634242c

8 years agoopenssl: ERR_remove_thread_state() is deprecated in latest 1.1.0
Daniel Stenberg [Thu, 19 May 2016 09:39:59 +0000 (11:39 +0200)]
openssl: ERR_remove_thread_state() is deprecated in latest 1.1.0

See OpenSSL commit 21e001747d4a

8 years agohttp2: use HTTP/2 in the HTTP/1.1-alike header
Daniel Stenberg [Thu, 19 May 2016 09:16:30 +0000 (11:16 +0200)]
http2: use HTTP/2 in the HTTP/1.1-alike header

... when generating them, not "2.0" as the protocol is called just
HTTP/2 and nothing else.

8 years agodist: include curl_multi_socket_all.3
Jay Satiro [Thu, 19 May 2016 07:13:07 +0000 (03:13 -0400)]
dist: include curl_multi_socket_all.3

Closes https://github.com/curl/curl/pull/816

8 years agobump: Start work on 7.49.1
Steve Holme [Wed, 18 May 2016 16:47:38 +0000 (17:47 +0100)]
bump: Start work on 7.49.1

8 years agocurlbuild.h.dist: check __LP64__ as well to fix MIPS build
Daniel Stenberg [Wed, 18 May 2016 12:10:36 +0000 (14:10 +0200)]
curlbuild.h.dist: check __LP64__ as well to fix MIPS build

The preprocessor check that sets up the 32bit defines for non-configure
builds didn't work properly for MIPS systems as __mips__ is defined for
both 32bit and 64bit. Now __LP64__ is also checked and indicates 64bit.

Reported-by: Tomas Jakobsson
Fixes #813

8 years agoschannel: fix compile break with MSVC XP toolset
Marcel Raad [Wed, 18 May 2016 09:54:58 +0000 (11:54 +0200)]
schannel: fix compile break with MSVC XP toolset

For the Windows XP toolset of Visual C++ 2013/2015, the old Windows SDK
7.1 is used. In this case, _USING_V110_SDK71_ is defined.

Closes #812

8 years agodist: include CHECKSRC.md
Daniel Stenberg [Wed, 18 May 2016 08:35:15 +0000 (10:35 +0200)]
dist: include CHECKSRC.md

Reported-by: Paul Howarth
Bug: https://curl.haxx.se/mail/lib-2016-05/0116.html

8 years agotest/Makefile.am: include manpage-scan.pl and nroff-scan.pl in dist
Daniel Stenberg [Wed, 18 May 2016 07:17:27 +0000 (09:17 +0200)]
test/Makefile.am: include manpage-scan.pl and nroff-scan.pl in dist

Reported-by: Ray Satiro
Bug: https://curl.haxx.se/mail/lib-2016-05/0113.html

8 years agoTHANKS: 24 new names from 7.49.0 release notes curl-7_49_0
Daniel Stenberg [Tue, 17 May 2016 12:50:19 +0000 (14:50 +0200)]
THANKS: 24 new names from 7.49.0 release notes

8 years agoRELEASE-NOTES: 7.49.0
Daniel Stenberg [Tue, 17 May 2016 12:02:11 +0000 (14:02 +0200)]
RELEASE-NOTES: 7.49.0

8 years agombedtls/polarssl: set "hostname" unconditionally
Daniel Stenberg [Sun, 24 Apr 2016 15:52:18 +0000 (17:52 +0200)]
mbedtls/polarssl: set "hostname" unconditionally

...as otherwise the TLS libs will skip the CN/SAN check and just allow
connection to any server. curl previously skipped this function when SNI
wasn't used or when connecting to an IP address specified host.

CVE-2016-3739

Bug: https://curl.haxx.se/docs/adv_20160518A.html
Reported-by: Moti Avrahami
8 years agoCURLOPT_RESOLVE.3: fix typo
Frank Gevaerts [Tue, 17 May 2016 12:22:56 +0000 (14:22 +0200)]
CURLOPT_RESOLVE.3: fix typo

Closes #811

8 years agodocs: CURLOPT_RESOLVE overrides CURLOPT_IPRESOLVE
Daniel Stenberg [Tue, 17 May 2016 11:17:07 +0000 (13:17 +0200)]
docs: CURLOPT_RESOLVE overrides CURLOPT_IPRESOLVE

8 years agoKNOWN_BUGS: GnuTLS backend skips really long certificate fields
Daniel Stenberg [Tue, 17 May 2016 09:13:48 +0000 (11:13 +0200)]
KNOWN_BUGS: GnuTLS backend skips really long certificate fields

Closes #762

8 years agoCURLOPT_HTTPPOST.3: the data needs to be around while in use
Daniel Stenberg [Tue, 17 May 2016 09:08:10 +0000 (11:08 +0200)]
CURLOPT_HTTPPOST.3: the data needs to be around while in use

8 years agoopenssl: get_cert_chain: fix NULL dereference
Daniel Stenberg [Tue, 17 May 2016 07:34:33 +0000 (09:34 +0200)]
openssl: get_cert_chain: fix NULL dereference

CID 1361815: Explicit null dereferenced (FORWARD_NULL)

8 years agoopenssl: get_cert_chain: avoid NULL dereference
Daniel Stenberg [Tue, 17 May 2016 07:14:06 +0000 (09:14 +0200)]
openssl: get_cert_chain: avoid NULL dereference

CID 1361811: Explicit null dereferenced (FORWARD_NULL)

8 years agodprintf_formatf: fix (false?) Coverity warning
Daniel Stenberg [Tue, 17 May 2016 07:06:32 +0000 (09:06 +0200)]
dprintf_formatf: fix (false?) Coverity warning

CID 1024412: Memory - illegal accesses (OVERRUN). Claimed to happen when
we run over 'workend' but the condition says <= workend and for all I
can see it should be safe. Compensating for the warning by adding a byte
margin in the buffer.

Also, removed the extra brace level indentation in the code and made it
so that 'workend' is only assigned once within the function.

8 years agoRELEASE-NOTES: synced with 2dcb5adc72d6
Daniel Stenberg [Mon, 16 May 2016 07:05:03 +0000 (09:05 +0200)]
RELEASE-NOTES: synced with 2dcb5adc72d6

8 years agoTHANKS-filter: fixed Jonathan Cardoso
Daniel Stenberg [Mon, 16 May 2016 07:04:13 +0000 (09:04 +0200)]
THANKS-filter: fixed Jonathan Cardoso

8 years agoftp: fix incorrect out-of-memory code in Curl_pretransfer
Jay Satiro [Mon, 16 May 2016 03:48:47 +0000 (23:48 -0400)]
ftp: fix incorrect out-of-memory code in Curl_pretransfer

- Return value type must match function type.

s/CURLM_OUT_OF_MEMORY/CURLE_OUT_OF_MEMORY/

Caught by Travis CI

8 years agoftp wildcard: segfault due to init only in multi_perform
Daniel Stenberg [Sat, 14 May 2016 22:37:36 +0000 (00:37 +0200)]
ftp wildcard: segfault due to init only in multi_perform

The proper FTP wildcard init is now more properly done in Curl_pretransfer()
and the corresponding cleanup in Curl_close().

The previous place of init/cleanup code made the internal pointer to be NULL
when this feature was used with the multi_socket() API, as it was made within
the curl_multi_perform() function.

Reported-by: Jonathan Cardoso Machado
Fixes #800

8 years agolibcurl-tlibcurl-thread: Update OpenSSL links
Jay Satiro [Fri, 13 May 2016 20:01:35 +0000 (16:01 -0400)]
libcurl-tlibcurl-thread: Update OpenSSL links

Because the old OpenSSL link now redirects to their master documentation
(currently 1.1.0), which does not document the required actions for
OpenSSL <= 1.0.2.

8 years agodarwinssl.c: fix OS X codename typo in comment
Viktor Szakats [Fri, 13 May 2016 07:25:54 +0000 (09:25 +0200)]
darwinssl.c: fix OS X codename typo in comment

8 years agoRELEASE-NOTES: synced with 68701e51c1f7
Daniel Stenberg [Thu, 12 May 2016 22:18:53 +0000 (00:18 +0200)]
RELEASE-NOTES: synced with 68701e51c1f7

Added 8 bug fixes and 5 more contrbutors

8 years agomprintf: Fix processing of width and prec args
Jay Satiro [Wed, 9 Mar 2016 07:59:05 +0000 (02:59 -0500)]
mprintf: Fix processing of width and prec args

Prior to this change a width arg could be erroneously output, and also
width and precision args could not be used together without crashing.

"%0*d%s", 2, 9, "foo"

Before: "092"
After: "09foo"

"%*.*s", 5, 2, "foo"

Before: crash
After: "   fo"

Test 557 is updated to verify this and more

8 years agoConnectionExists: follow-up fix for proxy re-use
Michael Kaufmann [Thu, 12 May 2016 22:02:21 +0000 (00:02 +0200)]
ConnectionExists: follow-up fix for proxy re-use

Follow-up commit to 5823179

Closes #648

8 years agodarwinssl: fix certificate verification disable on OS X 10.8
Per Malmberg [Thu, 12 May 2016 10:16:16 +0000 (12:16 +0200)]
darwinssl: fix certificate verification disable on OS X 10.8

The new way of disabling certificate verification doesn't work on
Mountain Lion (OS X 10.8) so we need to use the old way in that version
too. I've tested this solution on versions 10.7.5, 10.8, 10.9, 10.10.2
and 10.11.

Closes #802

8 years agohttp2: Add space between colon and header value
Cory Benfield [Wed, 11 May 2016 11:35:05 +0000 (12:35 +0100)]
http2: Add space between colon and header value

curl's representation of HTTP/2 responses involves transforming the
response to a format that is similar to HTTP/1.1. Prior to this change,
curl would do this by separating header names and values with only a
colon, without introducing a space after the colon.

While this is technically a valid way to represent a HTTP/1.1 header
block, it is much more common to see a space following the colon. This
change introduces that space, to ensure that incautious tools are safely
able to parse the header block.

This also ensures that the difference between the HTTP/1.1 and HTTP/2
response layout is as minimal as possible.

Bug: https://github.com/curl/curl/issues/797

Closes #798
Fixes #797

8 years agoopenssl: fix compile-time warning in Curl_ossl_check_cxn()
Kamil Dudka [Thu, 12 May 2016 06:36:21 +0000 (08:36 +0200)]
openssl: fix compile-time warning in Curl_ossl_check_cxn()

... introduced in curl-7_48_0-293-g2968c83:

Error: COMPILER_WARNING:
lib/vtls/openssl.c: scope_hint: In function ‘Curl_ossl_check_cxn’
lib/vtls/openssl.c:767:15: warning: conversion to ‘int’ from ‘ssize_t’
may alter its value [-Wconversion]

8 years agoopenssl: stricter connection check function
Jay Satiro [Thu, 12 May 2016 01:21:15 +0000 (21:21 -0400)]
openssl: stricter connection check function

- In the case of recv error, limit returning 'connection still in place'
to EINPROGRESS, EAGAIN and EWOULDBLOCK.

This is an improvement on the parent commit which changed the openssl
connection check to use recv MSG_PEEK instead of SSL_peek.

Ref: https://github.com/curl/curl/commit/856baf5#comments

8 years agoTLS: SSL_peek is not a const operation
Anders Bakken [Tue, 10 May 2016 19:49:33 +0000 (12:49 -0700)]
TLS: SSL_peek is not a const operation

Calling SSL_peek can cause bytes to be read from the raw socket which in
turn can upset the select machinery that determines whether there's data
available on the socket.

Since Curl_ossl_check_cxn only tries to determine whether the socket is
alive and doesn't actually need to see the bytes SSL_peek seems like
the wrong function to call.

We're able to occasionally reproduce a connect timeout due to this
bug. What happens is that Curl doesn't know to call SSL_connect again
after the peek happens since data is buffered in the SSL buffer and thus
select won't fire for this socket.

Closes #795

8 years agoTLS: move the ALPN/NPN enable bits to the connection
Daniel Stenberg [Mon, 9 May 2016 14:50:11 +0000 (16:50 +0200)]
TLS: move the ALPN/NPN enable bits to the connection

Only protocols that actually have a protocol registered for ALPN and NPN
should try to get that negotiated in the TLS handshake. That is only
HTTPS (well, http/1.1 and http/2) right now. Previously ALPN and NPN
would wrongly be used in all handshakes if libcurl was built with it
enabled.

Reported-by: Jay Satiro
Fixes #789

8 years agolibcurl-thread.3: openssl 1.1.0 is safe, and so is boringssl
Daniel Stenberg [Sun, 8 May 2016 13:48:26 +0000 (15:48 +0200)]
libcurl-thread.3: openssl 1.1.0 is safe, and so is boringssl

8 years agoconnect: fix invalid "Network is unreachable" errors
Antonio Larrosa [Thu, 5 May 2016 17:50:15 +0000 (19:50 +0200)]
connect: fix invalid "Network is unreachable" errors

Sometimes, in systems with both ipv4 and ipv6 addresses but where the
network doesn't support ipv6, Curl_is_connected returns an error
(intermittently) even if the ipv4 socket connects successfully.

This happens because there's a for-loop that iterates on the sockets but
the error variable is not resetted when the ipv4 is checked and is ok.

This patch fixes this problem by setting error to 0 when checking the
second socket and not having a result yet.

Fixes #794

8 years agoFAQ: refer to thread safety guidelines
Jay Satiro [Thu, 5 May 2016 18:34:27 +0000 (14:34 -0400)]
FAQ: refer to thread safety guidelines

8 years agoconnections: non-HTTP proxies on different ports aren't reused either
Daniel Stenberg [Mon, 2 May 2016 21:15:05 +0000 (23:15 +0200)]
connections: non-HTTP proxies on different ports aren't reused either

Reported-by: Oleg Pudeyev and fuchaoqun
Fixes #648

8 years agohttp: make sure a blank header overrides accept_decoding
Daniel Stenberg [Mon, 2 May 2016 09:24:11 +0000 (11:24 +0200)]
http: make sure a blank header overrides accept_decoding

Reported-by: rcanavan
Assisted-by: Isaac Boukris
Closes #785