]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
4 years agoRELEASE-NOTES: synced 7425/head
Daniel Stenberg [Thu, 29 Jul 2021 15:46:32 +0000 (17:46 +0200)] 
RELEASE-NOTES: synced

and bump curlver to 7.79.0 for next release

4 years agotests/*server.py: remove pidfile on server termination
Marc Hoersken [Fri, 16 Jul 2021 10:23:03 +0000 (12:23 +0200)] 
tests/*server.py: remove pidfile on server termination

Avoid pidfile leaking/laying around after server already exited.

Reviewed-by: Daniel Stenberg
Closes #7506

4 years agotool_main: fix typo in comment
Daniel Gustafsson [Tue, 27 Jul 2021 20:38:45 +0000 (22:38 +0200)] 
tool_main: fix typo in comment

The referred to library is NSPR, so fix the switched around characters.

4 years agobearssl: support CURLOPT_CAINFO_BLOB
Aleksandr Krotov [Wed, 21 Jul 2021 14:11:13 +0000 (21:11 +0700)] 
bearssl: support CURLOPT_CAINFO_BLOB

Closes #7468

4 years agocurl.1: mention "global" flags
Daniel Stenberg [Wed, 28 Jul 2021 15:41:05 +0000 (17:41 +0200)] 
curl.1: mention "global" flags

Mention options that are "global". A global command line option is one
that doesn't get reset at --next uses and therefore don't need to be
used again.

Reported-by: Josh Soref
Fixes #7457
Closes #7510

4 years agoCURLOPT_DOH_URL.3: CURLOPT_OPENSOCKETFUNCTION is not inherited
Daniel Stenberg [Wed, 28 Jul 2021 15:13:32 +0000 (17:13 +0200)] 
CURLOPT_DOH_URL.3: CURLOPT_OPENSOCKETFUNCTION is not inherited

Reported-by: Daniel Woelfel
Fixes #7441
Closes #7509

4 years agoKNOWN_BUGS: add more HTTP/3 problems
Daniel Stenberg [Wed, 28 Jul 2021 15:22:27 +0000 (17:22 +0200)] 
KNOWN_BUGS: add more HTTP/3 problems

Closes #7351
Closes #7339
Closes #7125

4 years agoCI/azure: reduce compile time with increased parallism
Marc Hoersken [Sun, 25 Jul 2021 18:05:43 +0000 (20:05 +0200)] 
CI/azure: reduce compile time with increased parallism

Azure Pipelines CI VMs have 2 CPUs, let's use them.

Closes #7489

4 years agodocs: fix grammar
Josh Soref [Mon, 26 Jul 2021 06:54:13 +0000 (02:54 -0400)] 
docs: fix grammar

Fixes https://github.com/curl/curl/issues/7444
Fixes https://github.com/curl/curl/issues/7451
Fixes https://github.com/curl/curl/issues/7465
Closes https://github.com/curl/curl/pull/7495

4 years agomail-rcpt.d: fix grammar
Jay Satiro [Mon, 26 Jul 2021 05:02:03 +0000 (01:02 -0400)] 
mail-rcpt.d: fix grammar

Remove confusing sentence that says to specify an e-mail address for
mail transfer, since that's implied.

Reported-by: Josh Soref
Fixes https://github.com/curl/curl/issues/7452
Closes https://github.com/curl/curl/pull/7495

4 years agoc-hyper: remove the hyper_executor_poll() loop from Curl_http
Daniel Stenberg [Mon, 26 Jul 2021 12:54:13 +0000 (14:54 +0200)] 
c-hyper: remove the hyper_executor_poll() loop from Curl_http

1. it's superfluous
2. it didn't work identically to the Curl_hyper_stream one which could
   cause problems like #7486

Pointed-out-by: David Cook
Closes #7499

4 years agocurl-openssl.m4: check lib64 for the pkg-config file 7503/head
Daniel Stenberg [Mon, 26 Jul 2021 19:51:11 +0000 (21:51 +0200)] 
curl-openssl.m4: check lib64 for the pkg-config file

OpenSSL recently started putting the libs in $prefix/lib64 on 'make
install', so we check that directory for pkg-config data if the 'lib'
check fails.

Closes #7503

4 years agoCURLOPT_SSL_CTX_*.3: tidy up the example
Daniel Stenberg [Mon, 26 Jul 2021 13:54:21 +0000 (15:54 +0200)] 
CURLOPT_SSL_CTX_*.3: tidy up the example

Use the proper code style. Don't store return codes that aren't read.
Copy the same example into CURLOPT_SSL_CTX_FUNCTION.3 as well.

Closes #7500

4 years agoexample/cookie_interface: fix scan-build printf warning
Daniel Stenberg [Mon, 26 Jul 2021 12:27:45 +0000 (14:27 +0200)] 
example/cookie_interface: fix scan-build printf warning

Follow-up to 4b79c4fb565

Fixes #7497
Closes #7498

4 years agolimit-rate.d: clarify base unit
Josh Soref [Sun, 25 Jul 2021 22:49:07 +0000 (18:49 -0400)] 
limit-rate.d: clarify base unit

Fixes #7439
Closes #7494

4 years agoexamples/cookie_interface: avoid printfing time_t directly
Carlo Marcelo Arenas Belón [Sat, 24 Jul 2021 18:54:30 +0000 (11:54 -0700)] 
examples/cookie_interface: avoid printfing time_t directly

time_t representation is undefined and varies on bitsize and signedness,
and as of C11 could be even non integer.

instead of casting to unsigned long (which would truncate in systems
with a 32bit long after 2106) use difftime to get the elapsed time as a
double and print that (without decimals) instead.

alternatively a cast to curl_off_t and its corresponding print
formatting could have been used (at least in POSIX) but portability and
curl agnostic code was prioritized.

Closes #7490

4 years agotests/servers: remove obsolete pid variable
Marc Hoersken [Fri, 23 Jul 2021 20:14:32 +0000 (22:14 +0200)] 
tests/servers: remove obsolete pid variable

Variable is not used since pidfile handling moved to util.[ch]

Reviewed-by: Jay Satiro
Closes #7482

4 years agotests/servers: use our platform-aware pid for server verification
Marc Hoersken [Fri, 23 Jul 2021 18:33:40 +0000 (20:33 +0200)] 
tests/servers: use our platform-aware pid for server verification

The pid used for server verification is later stored as pid2 in
the hash of running test servers and therefore used for shutdown.

The pid used for shutdown must be the platform-aware (Win32) pid
to avoid leaking test servers while running them using Cygwin/msys.

Reviewed-by: Jay Satiro
Closes #7481

4 years agotests/runtests.pl: cleanup copy&paste mistakes and unused code
Marc Hoersken [Fri, 23 Jul 2021 18:05:47 +0000 (20:05 +0200)] 
tests/runtests.pl: cleanup copy&paste mistakes and unused code

Reviewed-by: Jay Satiro
Part of #7481

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sun, 25 Jul 2021 11:33:03 +0000 (13:33 +0200)] 
RELEASE-NOTES: synced

bumped to 7.78.1 for next release

4 years agohttp_proxy: clear 'sending' when the outgoing request is sent
Daniel Stenberg [Fri, 23 Jul 2021 21:52:12 +0000 (23:52 +0200)] 
http_proxy: clear 'sending' when the outgoing request is sent

... so that Curl_connect_getsock() will know how to wait for the socket
to become readable and not writable after the entire CONNECT request has
been issued.

Regression added in 7.77.0

Reported-by: zloi-user on github
Assisted-by: Jay Satiro
Fixes #7155
Closes #7484

4 years agoopenssl: fix grammar
Josh Soref [Fri, 23 Jul 2021 04:01:08 +0000 (00:01 -0400)] 
openssl: fix grammar

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

4 years agoconfigure.ac: tweak nghttp2 library name fix again
Jay Satiro [Fri, 23 Jul 2021 21:05:05 +0000 (17:05 -0400)] 
configure.ac: tweak nghttp2 library name fix again

- Change extraction to handle multiple library names returned by
  pkg-config (eg a possible scenario with pkg-config --static).

Ref: https://github.com/curl/curl/pull/7472

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

4 years agoGet rid of the unused HAVE_SIG_ATOMIC_T et. al.
Dan Fandrich [Mon, 28 Jun 2021 15:30:32 +0000 (08:30 -0700)] 
Get rid of the unused HAVE_SIG_ATOMIC_T et. al.

It was added in 2006 but I see no evidence it was ever used.

4 years agodocs: change max-filesize caveat again
Jay Satiro [Fri, 23 Jul 2021 06:56:52 +0000 (02:56 -0400)] 
docs: change max-filesize caveat again

- Add protocols field to max-filesize.d.

- Revert wording on unknown file size caveat and do not discuss specific
  protocols in that section.

Partial revert of ecf0225. All max-filesize options now have the list of
protocols and it's clearer just to have that list without discussing
specific protocols in the caveat.

Reported-by: Josh Soref
Ref: https://github.com/curl/curl/issues/7453#issuecomment-884128762

4 years agoconfigure: tweak nghttp2 library name fix
Christian Weisgerber [Wed, 21 Jul 2021 21:33:32 +0000 (23:33 +0200)] 
configure: tweak nghttp2 library name fix

commit 29c7cf79e8b44cf (shipped in 7.78.0) introduced a problem by
assuming that LIB_H2 does not have any leading whitespace.  At least
OpenBSD's native pkg-config can produce such whitespace, though:

    $ pkg-config --libs-only-l libnghttp2
     -lnghttp2

As a result, the configure check for libnghttp2 will erroneously fail.

Bug: https://curl.se/mail/lib-2021-07/0050.html
Closes #7472

4 years agodocs/MQTT: update state of username/password support
Bastian Krause [Wed, 21 Jul 2021 21:59:42 +0000 (23:59 +0200)] 
docs/MQTT: update state of username/password support

PR #7243 implemented username/password support for MQTT, so let's drop
these items from the caveats.

Signed-off-by: Bastian Krause <bst@pengutronix.de>
Closes #7474

4 years agoCURLMOPT_TIMERFUNCTION.3: remove misplaced "time"
Oleg Pudeyev [Wed, 21 Jul 2021 16:17:49 +0000 (12:17 -0400)] 
CURLMOPT_TIMERFUNCTION.3: remove misplaced "time"

Closes #7470

4 years agoRELEASE-NOTES: synced curl-7_78_0
Daniel Stenberg [Mon, 19 Jul 2021 07:18:45 +0000 (09:18 +0200)] 
RELEASE-NOTES: synced

curl 7.78.0 release

4 years agowinbuild/MakefileBuild.vc: bump copyright year
Daniel Stenberg [Wed, 21 Jul 2021 06:42:01 +0000 (08:42 +0200)] 
winbuild/MakefileBuild.vc: bump copyright year

4 years agodocs: mention max-filesize options also apply to MQTT transfers
Jay Satiro [Wed, 21 Jul 2021 05:00:44 +0000 (01:00 -0400)] 
docs: mention max-filesize options also apply to MQTT transfers

Also make it clearer that the caveat 'if the file size is unknown it
the option will have no effect' may apply to protocols other than FTP
and HTTP.

Reported-by: Josh Soref
Fixes https://github.com/curl/curl/issues/7453

4 years agodocs/cmdline: fix grammar and typos
Josh Soref [Fri, 16 Jul 2021 07:34:18 +0000 (03:34 -0400)] 
docs/cmdline: fix grammar and typos

4 years agodump-header.d: Drop suggestion to use for cookie storage
Josh Soref [Sun, 18 Jul 2021 17:11:14 +0000 (13:11 -0400)] 
dump-header.d: Drop suggestion to use for cookie storage

Since --cookie-jar is the preferred way to store cookies, no longer
suggest using --dump-header to do so.

Co-authored-by: Daniel Stenberg
Closes https://github.com/curl/curl/issues/7414

4 years agodoc/cmdline: fix grammar and typos
Josh Soref [Tue, 20 Jul 2021 05:06:56 +0000 (01:06 -0400)] 
doc/cmdline: fix grammar and typos

Closes https://github.com/curl/curl/pull/7454
Closes https://github.com/curl/curl/pull/7455
Closes https://github.com/curl/curl/pull/7456
Closes https://github.com/curl/curl/pull/7459
Closes https://github.com/curl/curl/pull/7460
Closes https://github.com/curl/curl/pull/7461
Closes https://github.com/curl/curl/pull/7462
Closes https://github.com/curl/curl/pull/7463

4 years agovtls: fix connection reuse checks for issuer cert and case sensitivity
Daniel Stenberg [Fri, 18 Jun 2021 22:42:28 +0000 (00:42 +0200)] 
vtls: fix connection reuse checks for issuer cert and case sensitivity

CVE-2021-22924

Reported-by: Harry Sintonen
Bug: https://curl.se/docs/CVE-2021-22924.html

4 years agosectransp: check for client certs by name first, then file
Daniel Stenberg [Mon, 21 Jun 2021 08:35:09 +0000 (10:35 +0200)] 
sectransp: check for client certs by name first, then file

CVE-2021-22926

Bug: https://curl.se/docs/CVE-2021-22926.html

Assisted-by: Daniel Gustafsson
Reported-by: Harry Sintonen
4 years agotelnet: fix option parser to not send uninitialized contents
Daniel Stenberg [Sat, 12 Jun 2021 16:25:15 +0000 (18:25 +0200)] 
telnet: fix option parser to not send uninitialized contents

CVS-2021-22925

Reported-by: Red Hat Product Security
Bug: https://curl.se/docs/CVE-2021-22925.html

4 years agoconnect: fix wrong format specifier in connect error string
Jay Satiro [Mon, 19 Jul 2021 23:06:30 +0000 (19:06 -0400)] 
connect: fix wrong format specifier in connect error string

0842175 (not in any release) used the wrong format specifier (long int)
for timediff_t. On an OS such as Windows libcurl's timediff_t (usually
64-bit) is bigger than long int (32-bit). In 32-bit Windows builds the
upper 32-bits of the timediff_t were erroneously then used by the next
format specifier. Usually since the timeout isn't larger than 32-bits
this would result in null as a pointer to the string with the reason for
the connection failing. On other OSes or maybe other compilers it could
probably result in garbage values (ie crash on deref).

Before:
Failed to connect to localhost port 12345 after 1201 ms: (nil)

After:
Failed to connect to localhost port 12345 after 1203 ms: Connection refused

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

4 years agowinbuild: support alternate nghttp2 static lib name
Jay Satiro [Mon, 19 Jul 2021 17:59:06 +0000 (13:59 -0400)] 
winbuild: support alternate nghttp2 static lib name

- Support both nghttp2.lib and nghttp2_static.lib for static nghttp2.

nghttp2 briefly changed its static lib name to nghttp2_static, but then
made the _static suffix optional.

Ref: https://github.com/nghttp2/nghttp2/pull/1394
Ref: https://github.com/nghttp2/nghttp2/pull/1418
Ref: https://github.com/nghttp2/nghttp2/issues/1466

Reported-by: Pierre Yager
Fixes https://github.com/curl/curl/issues/7446
Closes https://github.com/curl/curl/pull/7447

4 years agodocs/cmdline: fix grammar and typos
Josh Soref [Mon, 19 Jul 2021 01:51:43 +0000 (21:51 -0400)] 
docs/cmdline: fix grammar and typos

Closes https://github.com/curl/curl/pull/7432
Closes https://github.com/curl/curl/pull/7436
Closes https://github.com/curl/curl/pull/7438
Closes https://github.com/curl/curl/pull/7440
Closes https://github.com/curl/curl/pull/7445

4 years agodelegation.d: mention what happens when used multiple times
Josh Soref [Fri, 16 Jul 2021 06:59:08 +0000 (02:59 -0400)] 
delegation.d: mention what happens when used multiple times

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

4 years agocreate-file-mode.d: mention what happens when used multiple times
Josh Soref [Fri, 16 Jul 2021 06:50:22 +0000 (02:50 -0400)] 
create-file-mode.d: mention what happens when used multiple times

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

4 years agoconfig.d: split comments and option-per line
Josh Soref [Fri, 16 Jul 2021 06:40:44 +0000 (02:40 -0400)] 
config.d: split comments and option-per line

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

4 years agomisc: copyright year range updates
Daniel Stenberg [Mon, 19 Jul 2021 07:19:20 +0000 (09:19 +0200)] 
misc: copyright year range updates

4 years agomailmap: add Tobias and Timur
Daniel Stenberg [Mon, 19 Jul 2021 07:17:35 +0000 (09:17 +0200)] 
mailmap: add Tobias and Timur

4 years agodocs: spell out directories instead of dirs in create-dirs
Josh Soref [Fri, 16 Jul 2021 06:47:34 +0000 (02:47 -0400)] 
docs: spell out directories instead of dirs in create-dirs

Write out directories rather than using the dirs abbrevation. Also
use plural form consistently, even if the code in the end might just
create a single directory.

Closes #7406
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
4 years agodocs: correct spelling errors and a broken link
Nyholm [Sun, 18 Jul 2021 00:45:38 +0000 (17:45 -0700)] 
docs: correct spelling errors and a broken link

Update grammar and spelling in docs and source code comments.

Closes: #7427
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
4 years agoCI/cirrus: install impacket from PyPI instead of FreeBSD packages
Marc Hoersken [Sun, 18 Jul 2021 10:33:36 +0000 (12:33 +0200)] 
CI/cirrus: install impacket from PyPI instead of FreeBSD packages

Availability of impacket as FreeBSD package is too flaky.

Stick to legacy version of cryptography which still
supports OpenSSL version 1.0.2 due to FreeBSD 11.

Reviewed-by: Daniel Stenberg
Closes #7418

4 years agodocs/cmdline: mention what happens when used multiple times
Josh Soref [Fri, 16 Jul 2021 07:10:53 +0000 (03:10 -0400)] 
docs/cmdline: mention what happens when used multiple times

For --dns-ipv4-addr, --dns-ipv6-addr and --dns-servers

Closes #7410
Closes #7411
Closes #7412

4 years agolib: fix compiler warnings with CURL_DISABLE_NETRC
MAntoniak [Sat, 17 Jul 2021 15:43:57 +0000 (17:43 +0200)] 
lib: fix compiler warnings with CURL_DISABLE_NETRC

warning C4189: 'netrc_user_changed': local variable is initialized but
not referenced

warning C4189: 'netrc_passwd_changed': local variable is initialized but
not referenced

Closes #7423

4 years agodisable-epsv.d: remove duplicate "(FTP)"
Daniel Stenberg [Sun, 18 Jul 2021 16:28:40 +0000 (18:28 +0200)] 
disable-epsv.d: remove duplicate "(FTP)"

... since the tooling adds that to the output based on the "Protocols:"
tag.

4 years agodocs: make the documentation for --etag-save match the program behaviour
Max Zettlmeißl [Sun, 18 Jul 2021 08:42:54 +0000 (10:42 +0200)] 
docs: make the documentation for --etag-save match the program behaviour

When using curl with the option `--etag-save` I expected it to save the
ETag without its surrounding quotes, as stated by the documentation in
the repository and by the generated man pages.

My first endeavour was to fix the program, but while investigating the
history of the relevant parts, I discovered that curl once saved the
ETag without the quotes.  This was undone by Daniel Stenberg in commit
`98c94596f5928840177b6bd3c7b0f0dd03a431af`, therefore I decided that in
this case the documentation should be adjusted to match the behaviour of
curl.

The changed save behaviour also made parts of the `--etag-compare`
documentation wrong or superfluous, so I adjusted those accordingly.

Closes #7429

4 years agowrite-out.d: add missing periods
Josh Soref [Fri, 16 Jul 2021 06:21:49 +0000 (02:21 -0400)] 
write-out.d: add missing periods

Closes #7404

4 years agoeasy: during upkeep, attach Curl_easy to connections in the cache
Josie Huddleston [Tue, 13 Jul 2021 12:23:26 +0000 (13:23 +0100)] 
easy: during upkeep, attach Curl_easy to connections in the cache

During the protocol-specific parts of connection upkeep, some code
assumes that the data->conn pointer already is set correctly.  However,
there's currently no guarantee of that in the code.

This fix temporarily attaches each connection to the Curl_easy object
before performing the protocol-specific connection check on it, in a
similar manner to the connection checking in extract_if_dead().

Fixes #7386
Closes #7387
Reported-by: Josie Huddleston
4 years agocleanup: spell DoH with a lowercase o
Josh Soref [Fri, 16 Jul 2021 07:17:03 +0000 (03:17 -0400)] 
cleanup: spell DoH with a lowercase o

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Closes #7413

4 years agoTheArtOfHttpScripting: polish
Josh Soref [Fri, 16 Jul 2021 08:56:33 +0000 (04:56 -0400)] 
TheArtOfHttpScripting: polish

- add missing backticks and comma

- fix proxy description:

* example proxy isn't local
* locally doesn't really make sense

Closes #7416

4 years agoform.d: add examples of `,`/`;` for file[name]
Josh Soref [Fri, 16 Jul 2021 10:30:55 +0000 (06:30 -0400)] 
form.d: add examples of `,`/`;` for file[name]

Fixes #7415
Closes #7417

4 years agombedtls: Remove unnecessary include
MAntoniak [Fri, 16 Jul 2021 15:21:02 +0000 (17:21 +0200)] 
mbedtls: Remove unnecessary include

- curl_setup.h: all references to mbedtls_md4* functions and structures
  are in the md4.c. This file already includes the <mbedtls/md4.h> file
  along with the file existence control (defined (MBEDTLS_MD4_C))

- curl_ntlm_core.c: unnecessary include - repeated below

Closes #7419

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 16 Jul 2021 21:27:49 +0000 (23:27 +0200)] 
RELEASE-NOTES: synced

4 years agomulti: fix crash in curl_multi_wait / curl_multi_poll
User Sg [Tue, 13 Jul 2021 17:47:04 +0000 (17:47 +0000)] 
multi: fix crash in curl_multi_wait / curl_multi_poll

Appears to have been caused by 51c0ebc (precedes 7.77.0) which added a
VALID_SOCK check to one of the loops through the sockets but not the
other.

Reported-by: sylgal@users.noreply.github.com
Authored-by: sylgal@users.noreply.github.com
Fixes https://github.com/curl/curl/issues/7379
Closes https://github.com/curl/curl/pull/7389

4 years agotool_help: remove unused define
Daniel Gustafsson [Mon, 12 Jul 2021 21:35:38 +0000 (23:35 +0200)] 
tool_help: remove unused define

The PRINT_LINES_PAUSE macro is no longer used, and has been mostly
cleaned out but one occurrence remained.

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

4 years agobuild: fix compiler warnings when CURL_DISABLE_VERBOSE_STRINGS
Sergey Markelov [Sun, 11 Jul 2021 21:06:38 +0000 (14:06 -0700)] 
build: fix compiler warnings when CURL_DISABLE_VERBOSE_STRINGS

fix compiler warnings about unused variables and parameters when
built with --disable-verbose.

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

4 years agobuild: fix IoctlSocket FIONBIO check
Andrea Pappacoda [Sat, 10 Jul 2021 22:49:58 +0000 (00:49 +0200)] 
build: fix IoctlSocket FIONBIO check

Prior to this change HAVE_IOCTLSOCKET_CAMEL_FIONBIO mistakenly checked
for (lowercase) ioctlsocket when it should have checked for IoctlSocket.

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

4 years agoconfigure: fix nghttp2 library name for static builds
t.artikov [Thu, 8 Jul 2021 20:11:14 +0000 (03:11 +0700)] 
configure: fix nghttp2 library name for static builds

Don't hardcode the nghttp2 library name,
because it can vary, be "nghttp2_static" for example.

Fixes https://github.com/curl/curl/issues/7367
Closes https://github.com/curl/curl/pull/7368

4 years ago[PellesC] fix _lseeki64() macro
Gisle Vanem [Thu, 15 Jul 2021 09:52:06 +0000 (11:52 +0200)] 
[PellesC] fix _lseeki64() macro

4 years ago[SChannel] Use '_tcsncmp()' instead
Gisle Vanem [Thu, 15 Jul 2021 14:28:29 +0000 (16:28 +0200)] 
[SChannel] Use '_tcsncmp()' instead

Revert previous change for PellesC.

Instead replace all use of `_tcsnccmp()` with `_tcsncmp()`.

4 years ago[PellesC] missing '_tcsnccmp'
Gisle Vanem [Thu, 15 Jul 2021 11:14:04 +0000 (13:14 +0200)] 
[PellesC] missing '_tcsnccmp'

PellesC compiler does not have this macro in it's `<tchar.h>`

4 years agoTODO: add mention of mbedTLS 3 incompatibilities
Daniel Gustafsson [Wed, 14 Jul 2021 21:54:43 +0000 (23:54 +0200)] 
TODO: add mention of mbedTLS 3 incompatibilities

Wyatt OʼDay reported in #7385 that mbedTLS isn't backwards compatible
and curl no longer builds with it. Document the need to fix our support
until so has been done.

Closes #7390
Fixes #7385
Reported-by: Wyatt OʼDay
Reviewed-by: Jay Satiro <raysatiro@yahoo.com>
4 years agodocs: fix inconsistencies in EGDSOCKET documentation
Daniel Gustafsson [Wed, 14 Jul 2021 21:47:37 +0000 (23:47 +0200)] 
docs: fix inconsistencies in EGDSOCKET documentation

Only the OpenSSL backend actually use the EGDSOCKET, and also use
TLS consistently rather than mixing SSL and TLS. While there, also
fix a minor spelling nit.

Closes: #7391
Reviewed-by: Jay Satiro <raysatiro@yahoo.com>
4 years agodocs: document missing arguments to commands
Борис Верховский [Tue, 13 Jul 2021 03:09:26 +0000 (21:09 -0600)] 
docs: document missing arguments to commands

This is a followup to commit f410b9e538129e77607fef1 fixing a few
more commands which takes arguments.

Closes #7382
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
4 years agodocs: fix incorrect argument name reference
Randolf J [Tue, 13 Jul 2021 07:50:12 +0000 (00:50 -0700)] 
docs: fix incorrect argument name reference

The documentation for the read callback was erroneously referencing
the nitems argument by nmemb.  The error was introduced in commit
ce0881edee3c7.

Closes #7383
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
4 years agotool_help: Document that --tlspassword takes a password
Борис Верховский [Sun, 11 Jul 2021 22:56:23 +0000 (16:56 -0600)] 
tool_help: Document that --tlspassword takes a password

Closes #7378
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
4 years agoscripts: Fix typo in release-notes instructions
Daniel Gustafsson [Sat, 10 Jul 2021 20:36:26 +0000 (22:36 +0200)] 
scripts: Fix typo in release-notes instructions

The command to run had a typo in the pathname which prevented copy
pasting it to work, which has annoyed me enough to fix this now.

4 years agoRELEASE-NOTES: synced
Daniel Gustafsson [Sat, 10 Jul 2021 20:34:55 +0000 (22:34 +0200)] 
RELEASE-NOTES: synced

4 years agowrite-out.d: Clarify urlnum is not unique for de-globbed URLs
Jay Satiro [Fri, 9 Jul 2021 04:55:52 +0000 (00:55 -0400)] 
write-out.d: Clarify urlnum is not unique for de-globbed URLs

Reported-by: Коваленко Анатолий Викторович
Fixes https://github.com/curl/curl/issues/7342
Closes https://github.com/curl/curl/pull/7369

4 years agodocs: Fix typos
William Desportes [Fri, 9 Jul 2021 12:21:32 +0000 (14:21 +0200)] 
docs: Fix typos

Closes: #7370
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
4 years agoRevert "ftp: Expression 'ftpc->wait_data_conn' is always false"
Jonathan Wernberg [Wed, 7 Jul 2021 12:55:33 +0000 (14:55 +0200)] 
Revert "ftp: Expression 'ftpc->wait_data_conn' is always false"

The reverted commit introduced a logic error in code that was
correct.

The client using libcurl would notice the error since FTP file
uploads in active transfer mode would somtimes complete with
success despite no transfer having been performed and the
"uploaded" file thus not being on the remote server afterwards.

The FTP server would notice the error because it receives a
RST on the data connection it has established with the client
before any data was transferred at all.

The logic error happens if the STOR response from the server have
arrived by the time ftp_multi_statemach() in the affected code path
is called, but the incoming data connection have not arrived yet.
In that case, the processing of the STOR response will cause
'ftpc->wait_data_conn' to be set to TRUE, contradicting the comment
in the code. Since 'complete' will also be set, later logic would
believe the transfer was done.

In most cases, the STOR response will not have arrived yet when
the affected code path is executed, or the incoming connection will
also have arrived, and thus the error would not express itself.
But if the speed difference of the device using libcurl and the
FTP server is exactly right, the error may happen as often as in
one out of hundred file transfers.

This reverts commit 49f3117a238b6eac0e22a32f50699a9eddcb66ab.

Bug: https://curl.se/mail/lib-2021-07/0025.html
Closes #7362

4 years agomsnprintf: return number of printed characters excluding null byte
Daniel Stenberg [Wed, 7 Jul 2021 12:51:17 +0000 (14:51 +0200)] 
msnprintf: return number of printed characters excluding null byte

... even when the output is "capped" by the maximum length argument.

Clarified in the docs.

Closes #7361

4 years agoinfof: remove newline from format strings, always append it
Daniel Stenberg [Tue, 6 Jul 2021 15:05:17 +0000 (17:05 +0200)] 
infof: remove newline from format strings, always append it

- the data needs to be "line-based" anyway since it's also passed to the
  debug callback/application

- it makes infof() work like failf() and consistency is good

- there's an assert that triggers on newlines in the format string

- Also removes a few instances of "..."

- Removes the code that would append "..." to the end of the data *iff*
  it was truncated in infof()

Closes #7357

4 years agoexamples/multi-single: fix scan-build warning
Daniel Stenberg [Wed, 7 Jul 2021 08:14:35 +0000 (10:14 +0200)] 
examples/multi-single: fix scan-build warning

warning: Value stored to 'mc' during its initialization is never read

Follow-up to ae8e11ed5fd2ce

Closes #7360

4 years agowolfssl: failing to set a session id is not reason to error out
Daniel Stenberg [Mon, 5 Jul 2021 15:55:24 +0000 (17:55 +0200)] 
wolfssl: failing to set a session id is not reason to error out

... as it is *probably* just timed out.

Reported-by: Francisco Munoz
Closes #7358

4 years agodocs/examples: use curl_multi_poll() in multi examples
Daniel Stenberg [Tue, 6 Jul 2021 08:51:46 +0000 (10:51 +0200)] 
docs/examples: use curl_multi_poll() in multi examples

The API is soon two years old and deserves being shown as the primary
way to drive multi code as it makes it much easier to write code.

multi-poll: removed

multi-legacy: add to show how we did multi API use before
curl_multi_wait/poll.

Closes #7352

4 years agoKNOWN_BUGS: flaky Windows CI builds
Daniel Stenberg [Mon, 5 Jul 2021 21:30:44 +0000 (23:30 +0200)] 
KNOWN_BUGS: flaky Windows CI builds

Closes #6972

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 5 Jul 2021 20:55:14 +0000 (22:55 +0200)] 
RELEASE-NOTES: synced

4 years agotest1147: hyper doesn't allow "crazy" request headers like built-in
Daniel Stenberg [Mon, 5 Jul 2021 14:53:00 +0000 (16:53 +0200)] 
test1147: hyper doesn't allow "crazy" request headers like built-in

... so strip that from the test.

Closes #7349

4 years agoc-hyper: bail on too long response headers
Daniel Stenberg [Mon, 5 Jul 2021 15:13:29 +0000 (17:13 +0200)] 
c-hyper: bail on too long response headers

To match with built-in behaviors. Makes test 1154 work.

Closes #7350

4 years agotest1151: added missing CRLF to work with hyper
Daniel Stenberg [Mon, 5 Jul 2021 15:13:13 +0000 (17:13 +0200)] 
test1151: added missing CRLF to work with hyper

Closes #7350

4 years agoc-hyper: add support for transfer-encoding in the request
Daniel Stenberg [Mon, 5 Jul 2021 13:52:39 +0000 (15:52 +0200)] 
c-hyper: add support for transfer-encoding in the request

Closes #7348

4 years agocmake: remove libssh2 feature checks
Andrea Pappacoda [Sun, 4 Jul 2021 18:13:50 +0000 (20:13 +0200)] 
cmake: remove libssh2 feature checks

libssh2 features are detected based on version since commit
9dbbba997608f7c3c5de1c627c77c8cd2aa85b73

Closes #7343

4 years agotest1116: hyper doesn't pass through "surprise-trailers"
Daniel Stenberg [Mon, 5 Jul 2021 08:55:38 +0000 (10:55 +0200)] 
test1116: hyper doesn't pass through "surprise-trailers"

Closes #7344

4 years agosocks4: scan for the IPv4 address in resolve results
Daniel Stenberg [Mon, 5 Jul 2021 11:28:26 +0000 (13:28 +0200)] 
socks4: scan for the IPv4 address in resolve results

Follow-up to 84d2839740 which changed the resolving to always resolve
both address families, but since SOCKS4 only supports IPv4 it should
scan for and use the first available IPv4 address.

Reported-by: shithappens2016 on github
Fixes #7345
Closes #7346

4 years agoproto.d: fix formatting for paragraphs after margin changes
Jay Satiro [Sat, 3 Jul 2021 21:36:51 +0000 (17:36 -0400)] 
proto.d: fix formatting for paragraphs after margin changes

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

4 years agopinnedpubkey.d: fix formatting for version support lists
Jay Satiro [Sat, 3 Jul 2021 21:11:00 +0000 (17:11 -0400)] 
pinnedpubkey.d: fix formatting for version support lists

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

4 years agoTODO: "Support in-memory certs/ca certs/keys" done
Daniel Stenberg [Fri, 2 Jul 2021 08:19:21 +0000 (10:19 +0200)] 
TODO: "Support in-memory certs/ca certs/keys" done

Has been suppored for a while now with the *BLOB options.

4 years agoexamples: safer and more proper read callback logic
Daniel Stenberg [Thu, 1 Jul 2021 07:21:40 +0000 (09:21 +0200)] 
examples: safer and more proper read callback logic

The same callback code is used in:

 imap-append.c
 smtp-authzid.c
 smtp-mail.c
 smtp-multi.c
 smtp-ssl.c
 smtp-tls.c

It should not assume that it can copy full lines into the buffer as it
will encourage sloppy coding practices. Instead use byte-wise logic and
check/acknowledge the buffer size appropriately.

Reported-by: Harry Sintonen
Fixes #7330
Closes #7331

4 years agotest1519: adjusted to work with hyper
Daniel Stenberg [Thu, 1 Jul 2021 09:22:11 +0000 (11:22 +0200)] 
test1519: adjusted to work with hyper

Closes #7333

4 years agotest1518: adjusted to work with hyper
Daniel Stenberg [Thu, 1 Jul 2021 09:21:05 +0000 (11:21 +0200)] 
test1518: adjusted to work with hyper

... by making sure the stdout output doesn't look like HTTP headers.

Closes #7333

4 years agotest1514: add a CRLF to the response to make it correct
Daniel Stenberg [Thu, 1 Jul 2021 10:50:11 +0000 (12:50 +0200)] 
test1514: add a CRLF to the response to make it correct

Makes hyper accept it fine instead returning HYPERE_UNEXPECTED_EOF on
us.

Closes #7334

4 years agoformdata: avoid "Argument cannot be negative" warning
Daniel Stenberg [Wed, 30 Jun 2021 22:14:22 +0000 (00:14 +0200)] 
formdata: avoid "Argument cannot be negative" warning

... when converting a curl_off_t to size_t, by using
CURL_ZERO_TERMINATED before passing the argument to the function.

Detected by Coverity CID 1486590.

Closes #7328
Assisted-by: Daniel Gustafsson
4 years agolib: more %u for port and int for %*s fixes
Daniel Stenberg [Wed, 30 Jun 2021 22:21:43 +0000 (00:21 +0200)] 
lib: more %u for port and int for %*s fixes

Detected by Coverity

Closes #7329