]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
4 years agoaltsvc: clone setting in curl_easy_duphandle 5923/head
Daniel Stenberg [Sat, 5 Sep 2020 19:21:26 +0000 (21:21 +0200)] 
altsvc: clone setting in curl_easy_duphandle

The cache content is not duplicated, like other caches, but the setting
and specified file name are.

Test 1908 is extended to verify this somewhat. Since the duplicated
handle gets the same file name, the test unfortunately overwrites the
same file twice (with different contents) which makes it hard to check
automatically.

Closes #5923

4 years agotest1541: remove since it is a known bug
Daniel Stenberg [Sat, 5 Sep 2020 18:30:26 +0000 (20:30 +0200)] 
test1541: remove since it is a known bug

A shared connection cache is not thread-safe is a known issue. Stop
testing this until we believe this issue is addressed. Reduces
occasional test failures we don't care about.

The test code in lib1541.c is left in git to allow us to restore it when
we get to fix this.

Closes #5922

4 years agotests: remove pipelining tests
Daniel Stenberg [Sat, 5 Sep 2020 16:42:29 +0000 (18:42 +0200)] 
tests: remove pipelining tests

Remove the tests 530, 584, 1900, 1901, 1902, 1903 and 2033. They were
previously disabled.

The Pipelining code was removed from curl in commit 2f44e94efb3df8e,
April 2019.

Closes #5921

4 years agocurl: retry delays in parallel mode no longer sleeps blocking
Daniel Stenberg [Sat, 5 Sep 2020 15:44:24 +0000 (17:44 +0200)] 
curl: retry delays in parallel mode no longer sleeps blocking

The previous sleep for retries would block all other concurrent
transfers. Starting now, the retry will instead be properly marked to
not get restarted until after the delay time but other transfers can
still continue in the mean time.

Closes #5917

4 years agocurl:parallel_transfers: make sure retry readds the transfer
Daniel Stenberg [Sat, 5 Sep 2020 15:04:03 +0000 (17:04 +0200)] 
curl:parallel_transfers: make sure retry readds the transfer

Reported-by: htasta on github
Fixes #5905
Closes #5917

4 years agobuild: drop support for building with Watcom
Daniel Stenberg [Sat, 5 Sep 2020 15:51:26 +0000 (17:51 +0200)] 
build: drop support for building with Watcom

These files are not maintained, they seem to have no users, Watcom
compilers look like not having users nor releases anymore.

Closes #5918

4 years agowinbuild/rundebug.cmd: remove
Daniel Stenberg [Sat, 5 Sep 2020 15:58:28 +0000 (17:58 +0200)] 
winbuild/rundebug.cmd: remove

Seems to have been added by mistake? Not included in dists.

Closes #5919

4 years agocurl: in retry output don't call all problems "transient"
Daniel Stenberg [Sat, 5 Sep 2020 13:46:55 +0000 (15:46 +0200)] 
curl: in retry output don't call all problems "transient"

... because when --retry-all-errors is used, the error isn't necessarily
transient at all.

Closes #5916

4 years agoeasygetopt: pass a valid enum to avoid compiler warning
Daniel Stenberg [Sat, 5 Sep 2020 10:52:03 +0000 (12:52 +0200)] 
easygetopt: pass a valid enum to avoid compiler warning

"integer constant not in range of enumerated type 'CURLoption'"

Reported-by: Gisle Vanem
Bug: https://github.com/curl/curl/commit/6ebe63fac23f38df911edc348e8ccc72280f9434#commitcomment-42042843

Closes #5915

4 years agotests: Add tests for new --help
Emil Engler [Tue, 14 Jul 2020 08:32:22 +0000 (10:32 +0200)] 
tests: Add tests for new --help

This commit is a part of "--help me if you can"

Closes #5680

4 years agotool: update --help with categories
Emil Engler [Wed, 2 Sep 2020 18:11:20 +0000 (20:11 +0200)] 
tool: update --help with categories

This commit is a part of "--help me if you can"

Closes #5680

4 years agodocs: add categories to all cmdline opts
Emil Engler [Mon, 13 Jul 2020 12:15:04 +0000 (14:15 +0200)] 
docs: add categories to all cmdline opts

Adapted gen.pl with 'listcats'

This commit is a part of "--help me if you can"

Closes #5680

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 4 Sep 2020 12:34:40 +0000 (14:34 +0200)] 
RELEASE-NOTES: synced

4 years agoconnect.c: remove superfluous 'else' in Curl_getconnectinfo
ihsinme [Fri, 4 Sep 2020 11:23:14 +0000 (14:23 +0300)] 
connect.c: remove superfluous 'else' in Curl_getconnectinfo

Closes #5912

4 years agoCMake: remove explicit `CMAKE_ANSI_CFLAGS`
Samuel Marks [Thu, 21 May 2020 10:21:50 +0000 (20:21 +1000)] 
CMake: remove explicit `CMAKE_ANSI_CFLAGS`

This variable was removed from cmake in commit
https://gitlab.kitware.com/cmake/cmake/commit/5a834b0bb0bc288. A later
CMake commit removes the variable from the tests, claiming that it was
removed in CMake 2.6

Reviewed-By: Peter Wu
Closes #5439

4 years agolibssh2: pass on the error from ssh_force_knownhost_key_type
cbe [Thu, 3 Sep 2020 13:52:54 +0000 (15:52 +0200)] 
libssh2: pass on the error from ssh_force_knownhost_key_type

Closes #5909

4 years agoscripts/delta: add diffstat summary
Daniel Stenberg [Thu, 3 Sep 2020 06:18:32 +0000 (08:18 +0200)] 
scripts/delta: add diffstat summary

... and make output more table-like

4 years agohttp_proxy: do not crash with HTTPS_PROXY and NO_PROXY set
Martin Bašti [Thu, 27 Aug 2020 21:09:56 +0000 (23:09 +0200)] 
http_proxy: do not crash with HTTPS_PROXY and NO_PROXY set

... in case NO_PROXY takes an effect

Without this patch, the following command crashes:

    $ GIT_CURL_VERBOSE=1 NO_PROXY=github.com HTTPS_PROXY=https://example.com \
        git clone https://github.com/curl/curl.git

Minimal libcurl-based reproducer:

    #include <curl/curl.h>

    int main() {
      CURL *curl = curl_easy_init();
      if(curl) {
        CURLcode ret;
        curl_easy_setopt(curl, CURLOPT_URL, "https://github.com/");
        curl_easy_setopt(curl, CURLOPT_PROXY, "example.com");
        /* set the proxy type */
        curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTPS);
        curl_easy_setopt(curl, CURLOPT_NOPROXY, "github.com");
        curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
        ret = curl_easy_perform(curl);
        curl_easy_cleanup(curl);
        return ret;
      }
      return -1;
    }

Assisted-by: Kamil Dudka
Bug: https://bugzilla.redhat.com/1873327
Closes #5902

4 years agotravis: add a CI job with openssl3 (from git master)
Daniel Stenberg [Wed, 2 Sep 2020 13:48:18 +0000 (15:48 +0200)] 
travis: add a CI job with openssl3 (from git master)

Closes #5908

4 years agoopenssl: avoid error conditions when importing native CA
Daniel Stenberg [Wed, 2 Sep 2020 13:26:09 +0000 (15:26 +0200)] 
openssl: avoid error conditions when importing native CA

The code section that is OpenSSL 3+ specific now uses the same logic as
is used in the version < 3 section. It caused a compiler error without
it.

Closes #5907

4 years agosetopt: avoid curl_ on local variable
Daniel Stenberg [Wed, 2 Sep 2020 10:47:01 +0000 (12:47 +0200)] 
setopt: avoid curl_ on local variable

Closes #5906

4 years agomqtt.c: avoid curl_ prefix on local variable
Daniel Stenberg [Wed, 2 Sep 2020 10:46:48 +0000 (12:46 +0200)] 
mqtt.c: avoid curl_ prefix on local variable

Closes #5906

4 years agowildcard: strip "curl_" prefix from private symbols
Daniel Stenberg [Wed, 2 Sep 2020 10:39:42 +0000 (12:39 +0200)] 
wildcard: strip "curl_" prefix from private symbols

Closes #5906

4 years agovtls: make it 'struct Curl_ssl_session'
Daniel Stenberg [Wed, 2 Sep 2020 10:17:49 +0000 (12:17 +0200)] 
vtls: make it 'struct Curl_ssl_session'

Use uppercase C for internal symbols.

Closes #5906

4 years agocurl_threads: make it 'struct Curl_actual_call'
Daniel Stenberg [Wed, 2 Sep 2020 10:12:40 +0000 (12:12 +0200)] 
curl_threads: make it 'struct Curl_actual_call'

Internal names should not be prefixed "curl_"

Closes #5906

4 years agoschannel: make it 'struct Curl_schannel*'
Daniel Stenberg [Wed, 2 Sep 2020 10:11:01 +0000 (12:11 +0200)] 
schannel: make it 'struct Curl_schannel*'

As internal global names should use captical C.

Closes #5906

4 years agohash: make it 'struct Curl_hash'
Daniel Stenberg [Wed, 2 Sep 2020 10:07:44 +0000 (12:07 +0200)] 
hash: make it 'struct Curl_hash'

As internal global names should use captical C.

Closes #5906

4 years agollist: make it "struct Curl_llist"
Daniel Stenberg [Wed, 2 Sep 2020 10:06:20 +0000 (12:06 +0200)] 
llist: make it "struct Curl_llist"

As internal global names should use captical C.

Closes #5906

4 years agotelnet.c: depend on static requirement of WinSock version 2
Marc Hoersken [Fri, 28 Aug 2020 19:54:03 +0000 (21:54 +0200)] 
telnet.c: depend on static requirement of WinSock version 2

Drop dynamic loading of ws2_32.dll and instead rely on the
imported version which is now required to be at least 2.2.

Reviewed-by: Marcel Raad
Reviewed-by: Jay Satiro
Reviewed-by: Daniel Stenberg
Reviewed-by: Viktor Szakats
Closes #5854

4 years agowin32: drop support for WinSock version 1, require version 2
Marc Hoersken [Sun, 30 Aug 2020 10:21:53 +0000 (12:21 +0200)] 
win32: drop support for WinSock version 1, require version 2

IPv6, telnet and now also the multi API require WinSock
version 2 which is available starting with Windows 95.

Therefore we think it is time to drop support for version 1.

Reviewed-by: Marcel Raad
Reviewed-by: Jay Satiro
Reviewed-by: Daniel Stenberg
Reviewed-by: Viktor Szakats
Follow up to #5634
Closes #5854

4 years agoselect: align poll emulation to return all relevant events
Marc Hoersken [Mon, 31 Aug 2020 08:49:20 +0000 (10:49 +0200)] 
select: align poll emulation to return all relevant events

The poll emulation via select already consumes POLLRDNORM,
POLLWRNORM and POLLRDBAND as input events. Therefore it
should also return them as output events if signaled.

Also fix indentation in input event handling block.

Assisted-by: Jay Satiro
Reviewed-by: Daniel Stenberg
Replaces #5852
Closes #5883

4 years agoCI/azure: MQTT is now enabled by default
Marc Hoersken [Tue, 1 Sep 2020 17:58:21 +0000 (19:58 +0200)] 
CI/azure: MQTT is now enabled by default

Reviewed-by: Daniel Stenberg
Follow up to #5858
Closes #5903

4 years agocopyright.pl: ignore buildconf
Daniel Stenberg [Wed, 2 Sep 2020 10:27:10 +0000 (12:27 +0200)] 
copyright.pl: ignore buildconf

4 years agotest971: show test mismatches "inline"
Daniel Stenberg [Wed, 2 Sep 2020 07:25:50 +0000 (09:25 +0200)] 
test971: show test mismatches "inline"

4 years agolib/Makefile.am: bump VERSIONINFO due to new functions
Daniel Stenberg [Tue, 1 Sep 2020 09:10:58 +0000 (11:10 +0200)] 
lib/Makefile.am: bump VERSIONINFO due to new functions

... we're generally bad at this, but we are adding new functions for
this release.

Closes #5899

4 years agooptiontable: use DEBUGBUILD
Daniel Stenberg [Tue, 1 Sep 2020 14:01:00 +0000 (16:01 +0200)] 
optiontable: use DEBUGBUILD

Follow-up to commit 6e18568ba38 (#5877)

4 years agocmdline-opts/gen.pl: generate nicer "See Also" in curl.1
Daniel Stenberg [Tue, 1 Sep 2020 08:16:45 +0000 (10:16 +0200)] 
cmdline-opts/gen.pl: generate nicer "See Also" in curl.1

If there are more than two items in the list, use commas for all but the
last separator which is set to 'and'. Reads better.

Closes #5898

4 years agocurl.1: add see also no-progress-meter on two spots
Daniel Stenberg [Tue, 1 Sep 2020 06:16:37 +0000 (08:16 +0200)] 
curl.1: add see also no-progress-meter on two spots

Ref: #5894

Closes #5897

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 31 Aug 2020 07:54:52 +0000 (09:54 +0200)] 
RELEASE-NOTES: synced

4 years agomqtt: enable by default
Daniel Stenberg [Mon, 31 Aug 2020 07:45:09 +0000 (09:45 +0200)] 
mqtt: enable by default

No longer considered experimental.

Closes #5858

4 years agotls: add CURLOPT_SSL_EC_CURVES and --curves
Michael Baentsch [Sat, 29 Aug 2020 12:09:24 +0000 (14:09 +0200)] 
tls: add CURLOPT_SSL_EC_CURVES and --curves

Closes #5892

4 years agourl: remove funny embedded comments in Curl_disonnect calls
Daniel Stenberg [Sun, 30 Aug 2020 15:02:44 +0000 (17:02 +0200)] 
url: remove funny embedded comments in Curl_disonnect calls

4 years agoconn: check for connection being dead before reuse
Chris Paulson-Ellis [Sat, 29 Aug 2020 17:26:50 +0000 (18:26 +0100)] 
conn: check for connection being dead before reuse

Prevents incorrect reuse of an HTTP connection that has been prematurely
shutdown() by the server.

Partial revert of 755083d00deb16

Fixes #5884
Closes #5893

4 years agobuildconf: exec autoreconf to avoid additional process
Marc Hoersken [Sat, 29 Aug 2020 09:12:08 +0000 (11:12 +0200)] 
buildconf: exec autoreconf to avoid additional process

Also make buildconf exit with the return code of autoreconf.

Reviewed-by: Daniel Stenberg
Follow up to #5853
Closes #5890

4 years agoCI/azure: no longer ignore results of test 1013
Marc Hoersken [Sat, 29 Aug 2020 09:09:32 +0000 (11:09 +0200)] 
CI/azure: no longer ignore results of test 1013

Follow up to #5771
Closes #5889

4 years agodocs: add description about CI platforms to CONTRIBUTE.md
Marc Hoersken [Sat, 29 Aug 2020 07:56:22 +0000 (09:56 +0200)] 
docs: add description about CI platforms to CONTRIBUTE.md

Reviewed-by: Daniel Stenberg
Reviewed-by: Marcel Raad
Reviewed-by: Jay Satiro
Closes #5882

4 years agotests/getpart: use MIME::Base64 instead of home-cooked
Daniel Stenberg [Fri, 28 Aug 2020 20:31:57 +0000 (22:31 +0200)] 
tests/getpart: use MIME::Base64 instead of home-cooked

Since we already use the base64 package since a while back, we can just
as well switch to that here too.

It also happens to use the exact same function name, which otherwise
causes a run-time warning.

Reported-by: Marc Hörsken
Fixes #5885
Closes #5887

4 years agontlm: fix condition for curl_ntlm_core usage
Marcel Raad [Mon, 3 Aug 2020 08:33:17 +0000 (10:33 +0200)] 
ntlm: fix condition for curl_ntlm_core usage

`USE_WINDOWS_SSPI` without `USE_WIN32_CRYPTO` but with any other DES
backend is fine, but was excluded before.

This also fixes test 1013 as the condition for SMB support in
configure.ac didn't match the condition in the source code. Now it
does.

Fixes https://github.com/curl/curl/issues/1262
Closes https://github.com/curl/curl/pull/5771

4 years agoAppVeyor: switch 64-bit Schannel Debug CMake builds to Unicode
Marcel Raad [Sat, 22 Aug 2020 08:16:13 +0000 (10:16 +0200)] 
AppVeyor: switch 64-bit Schannel Debug CMake builds to Unicode

The Schannel builds are the most useful to verify as they make the most
use of the Windows API. Classic MinGW doesn't support Unicode at all,
only MinGW-w64 and MSVC do.

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

4 years agoCMake: add option to enable Unicode on Windows
Marcel Raad [Sat, 22 Aug 2020 08:04:29 +0000 (10:04 +0200)] 
CMake: add option to enable Unicode on Windows

As already existing for winbuild.

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

4 years agoselect: simplify return code handling for poll and select
Marc Hoersken [Fri, 28 Aug 2020 16:21:47 +0000 (18:21 +0200)] 
select: simplify return code handling for poll and select

poll and select already return -1 on error according to POSIX,
so there is no need to perform a <0 to -1 conversion in code.

Also we can just use one check with <= 0 on the return code.

Assisted-by: Daniel Stenberg
Reviewed-by: Jay Satiro
Replaces #5852
Closes #5880

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 28 Aug 2020 21:48:25 +0000 (23:48 +0200)] 
RELEASE-NOTES: synced

4 years agotests: add test1912 with typechecks
Jeroen Ooms [Thu, 27 Aug 2020 22:20:47 +0000 (00:20 +0200)] 
tests: add test1912 with typechecks

Validates that gcc-typecheck macros match the new option type API.

Closes #5873

4 years agoeasyoptions: provide debug function when DEBUGBUILD
Daniel Stenberg [Fri, 28 Aug 2020 13:35:23 +0000 (15:35 +0200)] 
easyoptions: provide debug function when DEBUGBUILD

... not CURLDEBUG as they're not always set in conjunction.

Follow-up to 6ebe63fac23f38df

Fixes #5877
Closes #5878

4 years agosockfilt: handle FD_CLOSE winsock event on write socket
Marc Hoersken [Fri, 28 Aug 2020 20:30:39 +0000 (22:30 +0200)] 
sockfilt: handle FD_CLOSE winsock event on write socket

Learn from the way Cygwin handles and maps the WinSock events
to simulate correct and complete poll and select behaviour
according to Richard W. Stevens Network Programming book.

Follow up to #5867
Closes #5879

4 years agomulti: handle connection state winsock events
Marc Hoersken [Wed, 26 Aug 2020 20:13:21 +0000 (22:13 +0200)] 
multi: handle connection state winsock events

Learn from the way Cygwin handles and maps the WinSock events
to simulate correct and complete poll and select behaviour
according to Richard W. Stevens Network Programming book.

Reviewed-by: Jay Satiro
Reviewed-by: Marcel Raad
Follow up to #5634
Closes #5867

4 years agoCurl_pgrsTime - return new time to avoid timeout integer overflow
Daniel Stenberg [Mon, 24 Aug 2020 09:07:59 +0000 (11:07 +0200)] 
Curl_pgrsTime - return new time to avoid timeout integer overflow

Setting a timeout to INT_MAX could cause an immediate error to get
returned as timeout because of an overflow when different values of
'now' were used.

This is primarily fixed by having Curl_pgrsTime() return the "now" when
TIMER_STARTSINGLE is set so that the parent function will continue using
that time.

Reported-by: Ionuț-Francisc Oancea
Fixes #5583
Closes #5847

4 years agoTLS: fix SRP detection by using the proper #ifdefs
Daniel Stenberg [Thu, 27 Aug 2020 10:46:43 +0000 (12:46 +0200)] 
TLS: fix SRP detection by using the proper #ifdefs

USE_TLS_SRP will be true if *any* selected TLS backend can use SRP

HAVE_OPENSSL_SRP is defined when OpenSSL can use it

HAVE_GNUTLS_SRP is defined when GnuTLS can use it

Clarify in the curl_verison_info docs that CURL_VERSION_TLSAUTH_SRP is
set if at least one of the supported backends offers SRP.

Reported-by: Stefan Strogin
Fixes #5865
Closes #5870

4 years agodocs: SSLCERTS: fix English syntax
Dan Kenigsberg [Fri, 28 Aug 2020 11:26:30 +0000 (14:26 +0300)] 
docs: SSLCERTS: fix English syntax

Signed-off-by: Dan Kenigsberg <danken@redhat.com>
Closes #5876

4 years agodocs: non-existing macros in man pages
Alessandro Ghedini [Mon, 24 Aug 2020 08:00:13 +0000 (10:00 +0200)] 
docs: non-existing macros in man pages

As reported by man(1) when invoked as:

  man --warnings -E UTF-8 -l -Tutf8 -Z <file> >/dev/null

Closes #5846

4 years agocurl.1: fix typo invokved -> invoked
Alessandro Ghedini [Mon, 24 Aug 2020 07:59:14 +0000 (09:59 +0200)] 
curl.1: fix typo invokved -> invoked

Closes #5846

4 years agobuildconf: invoke 'autoreconf -fi' instead
Daniel Stenberg [Tue, 25 Aug 2020 14:14:18 +0000 (16:14 +0200)] 
buildconf: invoke 'autoreconf -fi' instead

The custom script isn't necessary anymore - but remains for simplicity
and just invokes autoreconf.

Closes #5853

4 years agolib: make Curl_gethostname accept a const pointer
Emil Engler [Wed, 26 Aug 2020 19:39:21 +0000 (21:39 +0200)] 
lib: make Curl_gethostname accept a const pointer

The address of that variable never gets changed, only the data in it so
why not make it a "char * const"?

Closes #5866

4 years agodocs/libcurl: update "Added in" version for curl_easy_option*
Daniel Stenberg [Thu, 27 Aug 2020 14:13:41 +0000 (16:13 +0200)] 
docs/libcurl: update "Added in" version for curl_easy_option*

Follow-up to 6ebe63fac23f38

4 years agoscripts: improve the "get latest curl release tag" logic
Daniel Stenberg [Thu, 27 Aug 2020 12:25:24 +0000 (14:25 +0200)] 
scripts: improve the "get latest curl release tag" logic

... by insiting on it matching "^curl-".

4 years agoconfigure: added --disable-get-easy-options
Daniel Stenberg [Wed, 26 Aug 2020 06:30:38 +0000 (08:30 +0200)] 
configure: added --disable-get-easy-options

To allow disabling of the curl_easy_option APIs in a build.

Closes #5365

4 years agooptions: API for meta-data about easy options
Daniel Stenberg [Wed, 26 Aug 2020 06:30:38 +0000 (08:30 +0200)] 
options: API for meta-data about easy options

 const struct curl_easyoption *curl_easy_option_by_name(const char *name);

 const struct curl_easyoption *curl_easy_option_by_id (CURLoption id);

 const struct curl_easyoption *
 curl_easy_option_next(const struct curl_easyoption *prev);

The purpose is to provide detailed enough information to allow for
example libcurl bindings to get option information at run-time about
what easy options that exist and what arguments they expect.

Assisted-by: Jeroen Ooms
Closes #5365

4 years agoHTTP/3: update to OpenSSL_1_1_1g-quic-draft-29
Eric Curtin [Thu, 27 Aug 2020 11:14:19 +0000 (12:14 +0100)] 
HTTP/3: update to OpenSSL_1_1_1g-quic-draft-29

Closes #5871

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 27 Aug 2020 09:31:27 +0000 (11:31 +0200)] 
RELEASE-NOTES: synced

4 years agoopenssl: Fix wincrypt symbols conflict with BoringSSL
Jay Satiro [Wed, 26 Aug 2020 05:49:47 +0000 (01:49 -0400)] 
openssl: Fix wincrypt symbols conflict with BoringSSL

OpenSSL undefines the conflicting symbols but BoringSSL does not so we
must do it ourselves.

Reported-by: Samuel Tranchet
Assisted-by: Javier Blazquez
Ref: https://bugs.chromium.org/p/boringssl/issues/detail?id=371
Ref: https://github.com/openssl/openssl/blob/OpenSSL_1_1_1g/include/openssl/ossl_typ.h#L66-L73

Fixes https://github.com/curl/curl/issues/5669
Closes https://github.com/curl/curl/pull/5857

4 years agosocketpair: allow CURL_DISABLE_SOCKETPAIR
Daniel Stenberg [Fri, 14 Aug 2020 13:45:08 +0000 (15:45 +0200)] 
socketpair: allow CURL_DISABLE_SOCKETPAIR

... to completely disable the use of socketpair

Closes #5850

4 years agocurl_get_line: build only if cookies or alt-svc are enabled
Daniel Stenberg [Fri, 14 Aug 2020 13:43:41 +0000 (15:43 +0200)] 
curl_get_line: build only if cookies or alt-svc are enabled

Closes #5851

4 years agoschannel: fix memory leak when using get_cert_location
fullincome [Wed, 26 Aug 2020 10:15:15 +0000 (13:15 +0300)] 
schannel: fix memory leak when using get_cert_location

The get_cert_location function allocates memory only on success.
Previously get_cert_location was able to allocate memory and return
error. It wasn't obvious and in this case the memory wasn't
released.

Fixes #5855
Closes #5860

4 years agogit: ignore libtests in 3XXX area
Emil Engler [Wed, 26 Aug 2020 10:00:30 +0000 (12:00 +0200)] 
git: ignore libtests in 3XXX area

Currently the file tests/libtest/lib3010 is not getting
ignored by git. This fixes it by adding the 3XXX area to
the according .gitignore file.

Closes #5859

4 years agodoh: add error message for DOH_DNS_NAME_TOO_LONG
Emil Engler [Wed, 26 Aug 2020 11:33:42 +0000 (13:33 +0200)] 
doh: add error message for DOH_DNS_NAME_TOO_LONG

When this error code was introduced in b6a53fff6c1d07e8a9, it was
forgotten to be added in the errors array and doh_strerror function.

Closes #5863

4 years agongtcp2: adapt to the new pkt_info arguments
Daniel Stenberg [Wed, 26 Aug 2020 13:25:53 +0000 (15:25 +0200)] 
ngtcp2: adapt to the new pkt_info arguments

Guidance-by: Tatsuhiro Tsujikawa
Closes #5864

4 years agowinbuild/README.md: make <options> visible
Daniel Stenberg [Wed, 26 Aug 2020 13:55:40 +0000 (15:55 +0200)] 
winbuild/README.md: make <options> visible

Follow-up to be753add31c2d8c

4 years agowinbuild: convert the instruction text to README.md
Daniel Stenberg [Wed, 26 Aug 2020 10:59:05 +0000 (12:59 +0200)] 
winbuild: convert the instruction text to README.md

Closes #5861

4 years agolib1560: verify "redirect" to double-slash leading URL
Daniel Stenberg [Tue, 25 Aug 2020 07:56:52 +0000 (09:56 +0200)] 
lib1560: verify "redirect" to double-slash leading URL

Closes #5849

4 years agomulti: expand pre-check for socket readiness
Marc Hoersken [Sun, 26 Jul 2020 19:26:46 +0000 (21:26 +0200)] 
multi: expand pre-check for socket readiness

Check readiness of all sockets before waiting on them
to avoid locking in case the one-time event FD_WRITE
was already consumed by a previous wait operation.

More information about WinSock network events:
https://docs.microsoft.com/en-us/windows/win32/api/
   winsock2/nf-winsock2-wsaeventselect#return-value

Closes #5634

4 years agomulti: implement wait using winsock events
rcombs [Wed, 13 May 2020 23:49:57 +0000 (18:49 -0500)] 
multi: implement wait using winsock events

This avoids using a pair of TCP ports to provide wakeup functionality
for every multi instance on Windows, where socketpair() is emulated
using a TCP socket on loopback which could in turn lead to socket
resource exhaustion.

A previous version of this patch failed to account for how in WinSock,
FD_WRITE is set only once when writing becomes possible and not again
until after a send has failed due to the buffer filling. This contrasts
to how FD_READ and FD_OOB continue to be set until the conditions they
refer to no longer apply. This meant that if a user wrote some data to
a socket, but not enough data to completely fill its send buffer, then
waited on that socket to become writable, we'd erroneously stall until
their configured timeout rather than returning immediately.

This version of the patch addresses that issue by checking each socket
we're waiting on to become writable with select() before the wait, and
zeroing the timeout if it's already writable.

Assisted-by: Marc Hörsken
Reviewed-by: Marcel Raad
Reviewed-by: Daniel Stenberg
Tested-by: Gergely Nagy
Tested-by: Rasmus Melchior Jacobsen
Tested-by: Tomas Berger
Replaces #5397
Reverts #5632
Closes #5634

4 years agoselect: reduce duplication of Curl_poll in Curl_socket_check
Marc Hoersken [Sun, 19 Apr 2020 18:27:38 +0000 (20:27 +0200)] 
select: reduce duplication of Curl_poll in Curl_socket_check

Change Curl_socket_check to use select-fallback in Curl_poll
instead of implementing it in Curl_socket_check and Curl_poll.

Reviewed-by: Daniel Stenberg
Reviewed-by: Jay Satiro
Replaces #5262 and #5492
Closes #5707

4 years agoselect: fix poll-based check not detecting connect failure
Marc Hoersken [Tue, 21 Jul 2020 18:17:01 +0000 (20:17 +0200)] 
select: fix poll-based check not detecting connect failure

This commit changes Curl_socket_check to use POLLPRI to
check for connect failure on the write socket, because
POLLPRI maps to fds_err. This is in line with select(2).

The select-based socket check correctly checks for connect
failures by adding the write socket also to fds_err.

The poll-based implementation (which internally can itself
fallback to select again) did not previously check for
connect failure by using POLLPRI with the write socket.

See the follow up commit to this for more information.

This commit makes sure connect failures can be detected
and handled if HAVE_POLL_FINE is defined, eg. on msys2-devel.

Reviewed-by: Daniel Stenberg
Reviewed-by: Jay Satiro
Replaces #5509
Prepares #5707

4 years agoselect.h: make socket validation macros test for INVALID_SOCKET
Marc Hoersken [Mon, 3 Aug 2020 13:54:08 +0000 (15:54 +0200)] 
select.h: make socket validation macros test for INVALID_SOCKET

With Winsock the valid range is [0..INVALID_SOCKET-1] according to
https://docs.microsoft.com/en-us/windows/win32/winsock/socket-data-type-2

Reviewed-by: Jay Satiro
Reviewed-by: Marcel Raad
Reviewed-by: Daniel Stenberg
Closes #5760

4 years agodocs: --output-dir is added in 7.73.0, nothing else
Daniel Stenberg [Mon, 24 Aug 2020 20:49:32 +0000 (22:49 +0200)] 
docs: --output-dir is added in 7.73.0, nothing else

Follow-up to 5620d2cc78c0

4 years agocurl: add --output-dir
Daniel Stenberg [Mon, 24 Aug 2020 06:31:36 +0000 (08:31 +0200)] 
curl: add --output-dir

Works with --create-dirs and with -J

Add test 3008, 3009, 3011, 3012 and 3013 to verify.

Closes #5637

4 years agoconfigure: fix pkg-config detecting wolfssl
Daniel Stenberg [Mon, 24 Aug 2020 14:28:34 +0000 (16:28 +0200)] 
configure: fix pkg-config detecting wolfssl

When amending the include path with "/wolfssl", this now properly strips
off all whitespace from the path variable! Previously this would lead to
pkg-config builds creating bad command lines.

Closes #5848

4 years agosftp: add the option CURLKHSTAT_FINE_REPLACE
Michael Musset [Wed, 15 Jul 2020 14:39:40 +0000 (16:39 +0200)] 
sftp: add the option CURLKHSTAT_FINE_REPLACE

Replace the old fingerprint of the host with a new.

Closes #5685

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 24 Aug 2020 14:59:50 +0000 (16:59 +0200)] 
RELEASE-NOTES: synced

The next release is now to become 7.73.0

4 years agochecksrc: verify do-while and spaces between the braces
Daniel Stenberg [Mon, 24 Aug 2020 07:31:39 +0000 (09:31 +0200)] 
checksrc: verify do-while and spaces between the braces

Updated mprintf.c to comply

Closes #5845

4 years agocurl: support XDG_CONFIG_HOME to find .curlrc
Daniel Stenberg [Fri, 21 Aug 2020 21:40:12 +0000 (23:40 +0200)] 
curl: support XDG_CONFIG_HOME to find .curlrc

Added test433 to verify. Updated documentation.

Reviewed-by: Jay Satiro
Suggested-by: Eli Schwartz
Fixes #5829
Closes #5837

4 years agoetag: save and use the full received contents
Daniel Stenberg [Wed, 19 Aug 2020 22:34:44 +0000 (00:34 +0200)] 
etag: save and use the full received contents

... which makes it support weak tags and non-standard etags too!

Added test case 347 to verify blank incoming ETag:

Fixes #5610
Closes #5833

4 years agosetopt: if the buffer exists, refuse the new BUFFERSIZE
Daniel Stenberg [Fri, 21 Aug 2020 14:19:27 +0000 (16:19 +0200)] 
setopt: if the buffer exists, refuse the new BUFFERSIZE

The buffer only exists during transfer and then we shouldn't change the
size (the setopt is not documented to work then).

Reported-by: Harry Sintonen
Closes #5842

4 years agosftp: add new quote commands 'atime' and 'mtime'
COFFEETALES [Thu, 13 Aug 2020 23:38:49 +0000 (01:38 +0200)] 
sftp: add new quote commands 'atime' and 'mtime'

Closes #5810

4 years agoCURLE_PROXY: new error code
Daniel Stenberg [Mon, 24 Aug 2020 06:39:29 +0000 (08:39 +0200)] 
CURLE_PROXY: new error code

Failures clearly returned from a (SOCKS) proxy now causes this return
code. Previously the situation was not very clear as what would be
returned and when.

In addition: when this error code is returned, an application can use
CURLINFO_PROXY_ERROR to query libcurl for the detailed error, which then
returns a value from the new 'CURLproxycode' enum.

Closes #5770

4 years agoruntests: make cleardir() erase dot files too
Daniel Stenberg [Fri, 21 Aug 2020 14:35:50 +0000 (16:35 +0200)] 
runtests: make cleardir() erase dot files too

Because test cases might use dot files.

Closes #5838

4 years agoKNOWN_BUGS: 'no_proxy' string-matches IPv6 numerical addreses
Daniel Stenberg [Sat, 22 Aug 2020 21:50:14 +0000 (23:50 +0200)] 
KNOWN_BUGS:  'no_proxy' string-matches IPv6 numerical addreses

Also: the current behavior is now documented in the curl.1 and
CURLOPT_NOPROXY.3 man pages.

Reported-by: Andrew Barnes
Closes #5745
Closes #5841

4 years agoMakefile.m32: add ability to override zstd libs [ci skip]
Viktor Szakats [Sat, 22 Aug 2020 21:06:06 +0000 (21:06 +0000)] 
Makefile.m32: add ability to override zstd libs [ci skip]

Similarly to brotli, where this was already possible.
E.g. it allows to link zstd statically to libcurl.dll.

Ref: https://github.com/curl/curl-for-win/issues/12
Ref: https://github.com/curl/curl-for-win/commit/d9b266afd2e5d3f5604483010ef62340b5918c89

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

4 years agoruntests: avoid 'fail to start' repeated messages in attempt loops
Daniel Stenberg [Fri, 21 Aug 2020 06:19:14 +0000 (08:19 +0200)] 
runtests: avoid 'fail to start' repeated messages in attempt loops

Closes #5834

4 years agoruntests: clear pid variables when failing to start a server
Daniel Stenberg [Wed, 19 Aug 2020 22:57:43 +0000 (00:57 +0200)] 
runtests: clear pid variables when failing to start a server

... as otherwise the parent doesn't detect the failure and believe it
actually worked to start.

Reported-by: Christian Weisgerber
Bug: https://curl.haxx.se/mail/lib-2020-08/0018.html
Closes #5834