]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
4 years agotool_operate: a failed etag save now only fails that transfer
Daniel Stenberg [Tue, 2 Nov 2021 14:16:18 +0000 (15:16 +0100)] 
tool_operate: a failed etag save now only fails that transfer

When failing to create the output file for saving an etag, only fail
that particular single transfer and allow others to follow.

In a serial transfer setup, if no transfer at all is done due to them
all being skipped because of this error, curl will output an error
message and return exit code 26.

Added test 369 and 370 to verify.

Reported-by: Earnestly on github
Ref: #7942
Closes #7945

4 years ago.github: retry macos "brew install" command on failure
Kevin Burke [Wed, 3 Nov 2021 23:41:57 +0000 (16:41 -0700)] 
.github: retry macos "brew install" command on failure

Previously we saw errors attempting to run "brew install", see
https://github.com/curl/curl/runs/4095721123?check_suite_focus=true for
an example, since this command is idempotent, it is safe to run again.

Closes #7955

4 years agoCURLOPT_ALTSVC_CTRL.3: mention conn reuse is preferred
Daniel Stenberg [Thu, 4 Nov 2021 10:26:46 +0000 (11:26 +0100)] 
CURLOPT_ALTSVC_CTRL.3: mention conn reuse is preferred

Ref: https://github.com/curl/curl/discussions/7954

Closes #7957

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 3 Nov 2021 22:27:53 +0000 (23:27 +0100)] 
RELEASE-NOTES: synced

4 years agozuul: pin the quiche build to use an older cmake-rs
Daniel Stenberg [Wed, 3 Nov 2021 13:25:49 +0000 (14:25 +0100)] 
zuul: pin the quiche build to use an older cmake-rs

The latest cmake-rs assumes cmake's --parallel works. That was added in
cmake 3.12, but a lot of our CI builds run on Ubuntu Bionic which only
has cmake 3.10.

Fixes #7927
Closes #7952

4 years agoRevert "src/tool_filetime: disable -Wformat on mingw for this file"
Marc Hoersken [Mon, 1 Nov 2021 20:56:30 +0000 (21:56 +0100)] 
Revert "src/tool_filetime: disable -Wformat on mingw for this file"

This reverts commit 7c88fe375b15c44d77bccc9ab733b8069d228e6f.

Follow up to #6535 as the pragma is obsolete with warnf

Closes #7941

4 years agoschannel: fix memory leak due to failed SSL connection
Jay Satiro [Tue, 2 Nov 2021 19:34:04 +0000 (15:34 -0400)] 
schannel: fix memory leak due to failed SSL connection

- Call schannel_shutdown if the SSL connection fails.

Prior to this change schannel_shutdown (which shuts down the SSL
connection as well as memory cleanup) was not called when the SSL
connection failed (eg due to failed handshake).

Co-authored-by: Gisle Vanem
Fixes https://github.com/curl/curl/issues/7877
Closes https://github.com/curl/curl/pull/7878

4 years agoCurl_updateconninfo: store addresses for QUIC connections too
Daniel Stenberg [Tue, 2 Nov 2021 08:10:12 +0000 (09:10 +0100)] 
Curl_updateconninfo: store addresses for QUIC connections too

So that CURLINFO_PRIMARY_IP etc work for HTTP/3 like for other HTTP
versions.

Reported-by: Jerome Mao
Fixes #7939
Closes #7944

4 years agocurl.1: fix typos in the manpage
Sergio Durigan Junior [Mon, 1 Nov 2021 18:14:24 +0000 (14:14 -0400)] 
curl.1: fix typos in the manpage

s/transfering/transferring/
s/transfered/transferred/

Signed-off-by: Sergio Durigan Junior <sergiodj@sergiodj.net>
Closes #7937

4 years agotests/smbserver.py: fix compatibility with impacket 0.9.23+
Marc Hoersken [Mon, 1 Nov 2021 11:06:07 +0000 (12:06 +0100)] 
tests/smbserver.py: fix compatibility with impacket 0.9.23+

impacket now performs sanity checks if the requested and to
be served file path actually is inside the real share path.

Ref: https://github.com/SecureAuthCorp/impacket/pull/1066

Fixes #7924
Closes #7935

4 years agodocs: reduce use of "very"
Daniel Stenberg [Mon, 1 Nov 2021 12:43:11 +0000 (13:43 +0100)] 
docs: reduce use of "very"

"Very" should be avoided in most texts. If intensifiers are needed, try
find better words instead.

Closes #7936

4 years agongtcp2: specify the missing required callback functions
Tatsuhiro Tsujikawa [Sun, 31 Oct 2021 13:38:44 +0000 (22:38 +0900)] 
ngtcp2: specify the missing required callback functions

Closes #7929

4 years agoCURLOPT_[PROXY]_SSL_CIPHER_LIST.3: bold instead of quote
Daniel Stenberg [Mon, 1 Nov 2021 09:14:11 +0000 (10:14 +0100)] 
CURLOPT_[PROXY]_SSL_CIPHER_LIST.3: bold instead of quote

Bold the example ciphers instead of using single quotes, which then also
avoids the problem of how to use single quotes when first in a line.

Also rephrased the pages a little.

Reported-by: Sergio Durigan Junior
Ref: #7928
Closes #7934

4 years agogen.pl: replace leading single quotes with \(aq
Daniel Stenberg [Mon, 1 Nov 2021 08:55:28 +0000 (09:55 +0100)] 
gen.pl: replace leading single quotes with \(aq

... and allow single quotes to be used "normally" in the .d files.

Makes the output curl.1 use better nroff.

Reported-by: Sergio Durigan Junior
Ref: #7928
Closes #7933

4 years agotests: kill some test servers afterwards to avoid locked logfiles
Marc Hoersken [Fri, 29 Oct 2021 20:29:40 +0000 (22:29 +0200)] 
tests: kill some test servers afterwards to avoid locked logfiles

Reviewed-by: Daniel Stenberg
Closes #7925

4 years agosmooth-gtk-thread.c: enhance the mutex lock use
Daniel Stenberg [Sun, 31 Oct 2021 16:12:03 +0000 (17:12 +0100)] 
smooth-gtk-thread.c: enhance the mutex lock use

Reported-by: ryancaicse on github
Fixes #7926
Closes #7931

4 years agoCI/runtests.pl: restore -u flag, but remove it from CI runs
Marc Hoersken [Fri, 29 Oct 2021 10:04:25 +0000 (12:04 +0200)] 
CI/runtests.pl: restore -u flag, but remove it from CI runs

This makes it possible to use -u again for local testing,
but removes the flag from CI config files and make targets.

Reviewed-by: Daniel Stenberg
Partially reverts #7841
Closes #7921

4 years agoCURLOPT_HSTSWRITEFUNCTION.3: using CURLOPT_HSTS_CTRL is required
Jonathan Cardoso Machado [Fri, 29 Oct 2021 13:20:04 +0000 (10:20 -0300)] 
CURLOPT_HSTSWRITEFUNCTION.3: using CURLOPT_HSTS_CTRL is required

Closes #7923

4 years agoimap: display quota information
Axel Morawietz [Tue, 27 Apr 2021 01:52:54 +0000 (18:52 -0700)] 
imap: display quota information

Show response to "GETQUOTAROOT INBOX" command.

Closes #6973

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 28 Oct 2021 19:27:56 +0000 (21:27 +0200)] 
RELEASE-NOTES: synced

4 years agocmake: fix error getting LOCATION property on non-imported target
Boris Rasin [Wed, 20 Oct 2021 14:34:19 +0000 (17:34 +0300)] 
cmake: fix error getting LOCATION property on non-imported target

Closes #7885

4 years agourl: check the return value of curl_url()
x2018 [Thu, 28 Oct 2021 11:55:46 +0000 (19:55 +0800)] 
url: check the return value of curl_url()

Closes #7917

4 years agoconfigure.ac: replace krb5-config with pkg-config
Roy Li [Tue, 26 Apr 2016 05:13:01 +0000 (13:13 +0800)] 
configure.ac: replace krb5-config with pkg-config

The rationale is that custom *-config tools don't work well when
cross-compiling or using sysroots (such as when using Yocto project) and
require custom fixing for each of them; pkg-config on the other hand
works similarly everywhere.

Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Closes #7916

4 years agotest1160: edited to work with hyper
Daniel Stenberg [Wed, 27 Oct 2021 09:05:51 +0000 (11:05 +0200)] 
test1160: edited to work with hyper

Closes #7912

4 years agodata/DISABLED: enable tests that now work with hyper
Daniel Stenberg [Wed, 27 Oct 2021 07:35:43 +0000 (09:35 +0200)] 
data/DISABLED: enable tests that now work with hyper

Closes #7911

4 years agotest559: add 'HTTP' in keywords
Daniel Stenberg [Wed, 27 Oct 2021 08:04:58 +0000 (10:04 +0200)] 
test559: add 'HTTP' in keywords

Makes it run fine with hyper

Closes #7911

4 years agotest552: updated to work with hyper
Daniel Stenberg [Wed, 27 Oct 2021 07:35:28 +0000 (09:35 +0200)] 
test552: updated to work with hyper

Closes #7911

4 years agogithub: fix incomplete permission to label PRs for Hacktoberfest
Marc Hoersken [Wed, 27 Oct 2021 20:08:20 +0000 (22:08 +0200)] 
github: fix incomplete permission to label PRs for Hacktoberfest

Unfortunately the GitHub API requires a token with write permission
for both issues and pull-requests to edit labels on even just PRs.

Follow up to #7897

4 years agoopt-manpages: use 'Added in' instead of 'Since'
Daniel Stenberg [Wed, 27 Oct 2021 09:45:26 +0000 (11:45 +0200)] 
opt-manpages: use 'Added in' instead of 'Since'

Closes #7913

4 years agogithub: fix missing permission to label PRs for Hacktoberfest
Marc Hoersken [Wed, 27 Oct 2021 10:40:15 +0000 (12:40 +0200)] 
github: fix missing permission to label PRs for Hacktoberfest

Follow up to #7897

Test references to see if permissions are now sufficient:

Closes #7832
Closes #7897

4 years agoCI: more use of test-ci make target and verbose output
Marc Hoersken [Fri, 8 Oct 2021 18:43:19 +0000 (20:43 +0200)] 
CI: more use of test-ci make target and verbose output

Replace test-nonflaky with test-ci and enable verbose output
in all remaining CIs except Zuul which is customized a lot.

Reviewed-by: Daniel Stenberg
Reviewed-by: Jay Satiro
Follow up to #7785
Closes #7832

4 years agogithub: add support for Hacktoberfest using labels 7897/head
Marc Hoersken [Sat, 23 Oct 2021 19:30:03 +0000 (21:30 +0200)] 
github: add support for Hacktoberfest using labels

Automatically add hacktoberfest-accepted label to PRs opened between
September 30th and November 1st once a commit with a close reference
to it is pushed onto the master branch.

With this workflow we can participate in Hacktoberfest while not
relying on GitHub to identify PRs as merged due to our rebasing.

Requires hacktoberfest-accepted labels to exist for PRs on the
participating repository. Also requires hacktoberfest topic on
the participating repository to avoid applying to forked repos.

Reviewed-by: Daniel Stenberg
Fixes #7865
Closes #7897

4 years agohttp: reject HTTP response codes < 100
Daniel Stenberg [Tue, 26 Oct 2021 15:47:14 +0000 (17:47 +0200)] 
http: reject HTTP response codes < 100

... which then also includes negative ones as test 1430 uses.

This makes native + hyper backend act identically on this and therefore
test 1430 can now be enabled when building with hyper. Adjust test 1431
as well.

Closes #7909

4 years agodocs: fix typo in CURLOPT_TRAILERFUNCTION example
Kerem Kat [Tue, 26 Oct 2021 17:06:13 +0000 (17:06 +0000)] 
docs: fix typo in CURLOPT_TRAILERFUNCTION example

Closes #7910

4 years agodocs/HYPER: remove some remaining issues, add HTTP/0.9 limitation
Daniel Stenberg [Tue, 26 Oct 2021 15:26:21 +0000 (17:26 +0200)] 
docs/HYPER: remove some remaining issues, add HTTP/0.9 limitation

4 years agoconfigure: when hyper is selected, deselect nghttp2
Daniel Stenberg [Tue, 26 Oct 2021 10:56:26 +0000 (12:56 +0200)] 
configure: when hyper is selected, deselect nghttp2

Closes #7908

4 years agosendf: accept zero-length data in Curl_client_write()
Patrick Monnerat [Mon, 25 Oct 2021 11:54:57 +0000 (13:54 +0200)] 
sendf: accept zero-length data in Curl_client_write()

Historically, Curl_client_write() used a length value of 0 as a marker
for a null-terminated data string. This feature has been removed in
commit f4b85d2. To detect leftover uses of the feature, a DEBUGASSERT
statement rejecting a length with value 0 was introduced, effectively
precluding use of this function with zero-length data.

The current commit removes the DEBUGASSERT and makes the function to
return immediately if length is 0.

A direct effect is to fix trying to output a zero-length distinguished
name in openldap.

Another DEBUGASSERT statement is also rephrased for better readability.

Closes #7898

4 years agohyper: disable test 1294 since hyper doesn't allow such crazy headers
Daniel Stenberg [Mon, 25 Oct 2021 15:14:13 +0000 (17:14 +0200)] 
hyper: disable test 1294 since hyper doesn't allow such crazy headers

Closes #7905

4 years agoc-hyper: make CURLOPT_SUPPRESS_CONNECT_HEADERS work
Daniel Stenberg [Mon, 25 Oct 2021 15:10:21 +0000 (17:10 +0200)] 
c-hyper: make CURLOPT_SUPPRESS_CONNECT_HEADERS work

Verified by the enabled test 1288

Closes #7905

4 years agotest1287: make work on hyper
Daniel Stenberg [Mon, 25 Oct 2021 14:49:52 +0000 (16:49 +0200)] 
test1287: make work on hyper

Closes #7905

4 years agotest1266/1267: disabled on hyper: no HTTP/0.9 support
Daniel Stenberg [Mon, 25 Oct 2021 14:47:43 +0000 (16:47 +0200)] 
test1266/1267: disabled on hyper: no HTTP/0.9 support

Closes #7905

4 years agoMakefile.m32: fix to not require OpenSSL with -libssh2 or -rtmp options
Viktor Szakats [Mon, 25 Oct 2021 19:10:55 +0000 (19:10 +0000)] 
Makefile.m32: fix to not require OpenSSL with -libssh2 or -rtmp options

Previously, -libssh2/-rtmp options assumed that OpenSSL is also enabled
(and then failed with an error when not finding expected OpenSSL headers),
but this isn't necessarly true, e.g. when building both libssh2 and curl
against Schannel. This patch makes sure to only enable the OpenSSL backend
with -libssh2/-rtmp, when there was no SSL option explicitly selected.

- Re-implement the logic as a single block of script.
- Also fix an indentation while there.

Assisted-by: Jay Satiro
Closes #7895

4 years agodocs: consistent use of "Added in"
Daniel Stenberg [Mon, 25 Oct 2021 09:45:09 +0000 (11:45 +0200)] 
docs: consistent use of "Added in"

Make them all say "Added in [version]" without using 'curl' or 'libcurl'
in that phrase.

4 years agoman pages: require all to use the same section header order
Daniel Stenberg [Mon, 25 Oct 2021 06:54:08 +0000 (08:54 +0200)] 
man pages: require all to use the same section header order

This is the same order we already enforce among the options' man pages:
consistency is good. Add lots of previously missing examples.

Adjust the manpage-syntax script for this purpose, used in test 1173.

Closes #7904

4 years agodocs/HTTP3: improve build instructions
David Hu [Tue, 12 Oct 2021 01:38:01 +0000 (18:38 -0700)] 
docs/HTTP3: improve build instructions

1. If writing to a system path if the command is not prefixed with
`sudo` it will cause a permission denied error

2. The patched OpenSSL branch has been updated to `openssl-3.0.0+quic`
to match upstream OpenSSL version.

3. We should not disable GnuTLS docs.

Updated some commands about `make install`

Closes #7842

4 years agoCMake: restore support for SecureTransport on iOS
Ricardo Martins [Tue, 19 Oct 2021 12:56:02 +0000 (13:56 +0100)] 
CMake: restore support for SecureTransport on iOS

Restore support for building curl for iOS with SecureTransport enabled.

Closes #7501

4 years agotests: enable more tests with hyper
Daniel Stenberg [Sun, 24 Oct 2021 21:13:14 +0000 (23:13 +0200)] 
tests: enable more tests with hyper

Adjusted 1144, 1164 and 1176.

Closes #7900

4 years agodocs: provide "RETURN VALUE" section for more func manpages
Daniel Stenberg [Mon, 25 Oct 2021 05:50:25 +0000 (07:50 +0200)] 
docs: provide "RETURN VALUE" section for more func manpages

Three were missing, one used a non-standard name for the header.

Closes #7902

4 years agocurl_multi_socket_action.3: add a "RETURN VALUE" section
Jay Satiro [Sun, 24 Oct 2021 21:52:54 +0000 (17:52 -0400)] 
curl_multi_socket_action.3: add a "RETURN VALUE" section

.. because it may not be immediately clear to the user what
curl_multi_socket_action returns.

Ref: https://curl.se/mail/lib-2021-10/0035.html

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

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sun, 24 Oct 2021 19:28:39 +0000 (21:28 +0200)] 
RELEASE-NOTES: synced

4 years agotests: use python3 in test 1451
Samuel Henrique [Sun, 24 Oct 2021 17:18:26 +0000 (18:18 +0100)] 
tests: use python3 in test 1451

This is a continuation of commit ec91b5a69000bea0794bbb3 in which
changing this test was missed.  There are no other python2 leftovers
now.

Based on a Debian patch originally written by Alessandro Ghedini
<ghedo@debian.org>

Closes #7899

4 years agolib: fixing comment spelling typos in lib files
Eddie Lumpkin [Fri, 22 Oct 2021 18:59:11 +0000 (18:59 +0000)] 
lib: fixing comment spelling typos in lib files

Closes #7894
Signed-off-by: ewlumpkin <ewlumpkin@gmail.com>
4 years agoopenssl: if verifypeer is not requested, skip the CA loading
Daniel Stenberg [Fri, 22 Oct 2021 10:34:34 +0000 (12:34 +0200)] 
openssl: if verifypeer is not requested, skip the CA loading

It was previously done mostly to show a match/non-match in the verbose
output even when verification was not asked for. This change skips the
loading of the CA certs unless verifypeer is set to save memory and CPU.

Closes #7892

4 years agocurl-confopts.m4: remove --enable/disable-hidden-symbols
Daniel Stenberg [Fri, 22 Oct 2021 07:13:30 +0000 (09:13 +0200)] 
curl-confopts.m4:  remove --enable/disable-hidden-symbols

These configure options have been saying "deprecated" since 9e24b9c7af
(April 2012). It was about time we remove them.

Closes #7891

4 years agoc-hyper: don't abort CONNECT responses early when auth-in-progress
Daniel Stenberg [Fri, 22 Oct 2021 08:57:54 +0000 (10:57 +0200)] 
c-hyper: don't abort CONNECT responses early when auth-in-progress

... and make sure to stop ignoring the body once the CONNECT is done.

This should make test 206 work proper again and not be flaky.

Closes #7889

4 years agohyper: does not support disabling CURLOPT_HTTP_TRANSFER_DECODING
Daniel Stenberg [Fri, 22 Oct 2021 06:44:14 +0000 (08:44 +0200)] 
hyper: does not support disabling CURLOPT_HTTP_TRANSFER_DECODING

Simply because hyper doesn't have this ability. Mentioned in docs now.

Skip test 326 then

Closes #7889

4 years agotest262: don't attempt with hyper
Daniel Stenberg [Thu, 21 Oct 2021 20:30:37 +0000 (22:30 +0200)] 
test262: don't attempt with hyper

This test verifies that curl works with binary zeroes in HTTP response
headers and hyper refuses such. They're not kosher http.

Closes #7889

4 years agoc-hyper: make test 217 run
Daniel Stenberg [Thu, 21 Oct 2021 17:44:29 +0000 (19:44 +0200)] 
c-hyper: make test 217 run

Closes #7889

4 years agoDISABLED: enable test 209+213 for hyper
Daniel Stenberg [Thu, 21 Oct 2021 15:37:56 +0000 (17:37 +0200)] 
DISABLED: enable test 209+213 for hyper

Follow-up to 823d3ab855c

Closes #7889

4 years agotest207: accept a different error code for hyper
Daniel Stenberg [Thu, 21 Oct 2021 15:36:19 +0000 (17:36 +0200)] 
test207: accept a different error code for hyper

It returns HYPERE_UNEXPECTED_EOF for this case which we convert to the
somewhat generic CURLE_RECV_ERROR.

Closes #7889

4 years agoINSTALL: update symbol hiding option
Érico Nogueira [Thu, 21 Oct 2021 19:57:33 +0000 (16:57 -0300)] 
INSTALL: update symbol hiding option

--enable-hidden-symbols was deprecated in
9e24b9c7afbcb81120af4cf3f6cdee49a06d8224.

Closes #7890

4 years agohttp_proxy: multiple CONNECT with hyper done better
Daniel Stenberg [Thu, 21 Oct 2021 14:42:42 +0000 (16:42 +0200)] 
http_proxy: multiple CONNECT with hyper done better

Enabled test 206

Closes #7888

4 years agohyper: pass the CONNECT line to the debug callback
Daniel Stenberg [Thu, 21 Oct 2021 14:03:11 +0000 (16:03 +0200)] 
hyper: pass the CONNECT line to the debug callback

Closes #7887

4 years agomailmap: Malik Idrees Hasan Khan
Daniel Stenberg [Thu, 21 Oct 2021 07:43:51 +0000 (09:43 +0200)] 
mailmap: Malik Idrees Hasan Khan

4 years agobuild: fix typos
MalikIdreesHasa [Thu, 21 Oct 2021 05:41:22 +0000 (05:41 +0000)] 
build: fix typos

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

4 years agoURL-SYNTAX: add IMAP UID SEARCH example
Jay Satiro [Tue, 19 Oct 2021 19:37:19 +0000 (15:37 -0400)] 
URL-SYNTAX: add IMAP UID SEARCH example

- Explain the difference between IMAP search via URL (which returns
  message sequence numbers) and IMAP search via custom request (which
  can return UID numbers if prefixed with UID, eg "UID SEARCH ...").

Bug: https://github.com/curl/curl/issues/7626
Reported-by: orycho@users.noreply.github.com
Ref: https://github.com/curl/curl/issues/2789

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

4 years agomanpage: adjust the asterisk in some SYNOPSIS sections
Daniel Stenberg [Wed, 20 Oct 2021 14:00:46 +0000 (16:00 +0200)] 
manpage: adjust the asterisk in some SYNOPSIS sections

Closes #7884

4 years agocurl_multi_perform.3: polish wording
Daniel Stenberg [Wed, 20 Oct 2021 06:49:17 +0000 (08:49 +0200)] 
curl_multi_perform.3: polish wording

 - simplify the example by using curl_multi_poll

 - mention curl_multi_add_handle in the text

 - cut out the description of pre-7.20.0 return code behavior - that version
   is now more than eleven years old and is basically no longer out there

 - adjust the "typical usage" to mention curl_multi_poll

Closes #7883

4 years agodocs/THANKS: removed on request
Daniel Stenberg [Wed, 20 Oct 2021 08:42:52 +0000 (10:42 +0200)] 
docs/THANKS: removed on request

4 years agoFAQ: polish the explanation of libcurl
Daniel Stenberg [Wed, 20 Oct 2021 07:24:18 +0000 (09:24 +0200)] 
FAQ: polish the explanation of libcurl

4 years agocurl_easy_perform.3: minor wording tweak
Daniel Stenberg [Wed, 20 Oct 2021 06:41:06 +0000 (08:41 +0200)] 
curl_easy_perform.3: minor wording tweak

4 years agomime: mention CURL_DISABLE_MIME in comment
Erik Stenlund [Tue, 19 Oct 2021 20:56:13 +0000 (22:56 +0200)] 
mime: mention CURL_DISABLE_MIME in comment

CURL_DISABLE_MIME is not mentioned in the comment describing the if else
preprocessor directive.

Closes #7882

4 years agotls: remove newline from three infof() calls
Daniel Stenberg [Tue, 19 Oct 2021 15:38:18 +0000 (17:38 +0200)] 
tls: remove newline from three infof() calls

Follow-up to e7416cf

Reported-by: billionai on github
Fixes #7879
Closes #7880

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 19 Oct 2021 08:39:40 +0000 (10:39 +0200)] 
RELEASE-NOTES: synced

4 years agocurl_gssapi: fix build warnings by removing const
Daniel Stenberg [Tue, 19 Oct 2021 07:37:41 +0000 (09:37 +0200)] 
curl_gssapi: fix build warnings by removing const

Follow-up to 20e980f85b0ea6

In #7875 these inits were modified but I get two warnings that these new
typecasts are necessary for.

Closes #7876

4 years agocurl_gssapi: fix link error on macOS Monterey
Bo Anderson [Mon, 18 Oct 2021 19:18:28 +0000 (20:18 +0100)] 
curl_gssapi: fix link error on macOS Monterey

Fixes #7657
Closes #7875

4 years agotest1185: verify checksrc
Daniel Stenberg [Sun, 17 Oct 2021 22:16:50 +0000 (00:16 +0200)] 
test1185: verify checksrc

Closes #7866

4 years agochecksrc: improve the SPACESEMICOLON error message
Daniel Stenberg [Mon, 18 Oct 2021 08:46:04 +0000 (10:46 +0200)] 
checksrc: improve the SPACESEMICOLON error message

and adjust the MULTISPACE one to use plural

Closes #7866

4 years agourl: set "k->size" -1 at start of request
Daniel Stenberg [Mon, 18 Oct 2021 12:36:34 +0000 (14:36 +0200)] 
url: set "k->size" -1 at start of request

The size of the transfer is unknown at that point.

Fixes #7871
Closes #7872

4 years agodoh: remove experimental code for DoH with GET
Daniel Gustafsson [Mon, 18 Oct 2021 11:25:57 +0000 (13:25 +0200)] 
doh: remove experimental code for DoH with GET

The code for sending DoH requests with GET was never enabled in a way
such that it could be used or tested. As there haven't been requests
for this feature, and since it at this is effectively dead, remove it
and favor reimplementing the feature in case anyone is interested.

Closes #7870
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
4 years agocirrus: remove FreeBSD 11.4 from the matrix
Daniel Stenberg [Mon, 18 Oct 2021 07:51:11 +0000 (09:51 +0200)] 
cirrus: remove FreeBSD 11.4 from the matrix

It has reached End-Of-Life and causes some LDAP CI issues.

Closes #7869

4 years agocirrus: switch to openldap24-client
Daniel Stenberg [Mon, 18 Oct 2021 07:22:33 +0000 (09:22 +0200)] 
cirrus: switch to openldap24-client

... as it seems openldap-client doesn't exist anymore.

Reported-by: Jay Satiro
Fixes #7868
Closes #7869

4 years agochecksrc: ignore preprocessor lines
Daniel Stenberg [Sat, 16 Oct 2021 11:50:25 +0000 (13:50 +0200)] 
checksrc: ignore preprocessor lines

In order to check the actual code better, checksrc now ignores
everything that look like preprocessor instructions. It also means
that code in macros are now longer checked.

Note that some rules then still don't need to be followed when code is
exactly below a cpp instruction.

Removes two checksrc exceptions we needed previously because of
preprocessor lines being checked.

Reported-by: Marcel Raad
Fixes #7863
Closes #7864

4 years agourlapi: skip a strlen(), pass in zero
Daniel Stenberg [Fri, 15 Oct 2021 14:29:52 +0000 (16:29 +0200)] 
urlapi: skip a strlen(), pass in zero

... to let curl_easy_escape() itself do the strlen. This avoids a (false
positive) Coverity warning and it avoids us having to store the strlen()
return value in an int variable.

Reviewed-by: Daniel Gustafsson
Closes #7862

4 years agomisc: update copyright years
Daniel Stenberg [Fri, 15 Oct 2021 15:07:19 +0000 (17:07 +0200)] 
misc: update copyright years

4 years agoexamples/htmltidy: correct wrong printf() use
Daniel Stenberg [Fri, 15 Oct 2021 06:02:48 +0000 (08:02 +0200)] 
examples/htmltidy: correct wrong printf() use

... and update the includes to match how current htmltidy wants them
used.

Reported-by: Stathis Kapnidis
Fixes #7860
Closes #7861

4 years agohttp: set content length earlier
Jay Satiro [Fri, 1 Oct 2021 17:57:23 +0000 (13:57 -0400)] 
http: set content length earlier

- Make content length (ie download size) accessible to the user in the
  header callback, but only after all headers have been processed (ie
  only in the final call to the header callback).

Background:

For a long time the content length could be retrieved in the header
callback via CURLINFO_CONTENT_LENGTH_DOWNLOAD_T as soon as it was parsed
by curl.

Changes were made in 8a16e54 (precedes 7.79.0) to ignore content length
if any transfer encoding is used. A side effect of that was that
content length was not set by libcurl until after the header callback
was called the final time, because until all headers are processed it
cannot be determined if content length is valid.

This change keeps the same intention --all headers must be processed--
but now the content length is available before the final call to the
header function that indicates all headers have been processed (ie
a blank header).

Bug: https://github.com/curl/curl/commit/8a16e54#r57374914
Reported-by: sergio-nsk@users.noreply.github.com
Co-authored-by: Daniel Stenberg
Fixes https://github.com/curl/curl/issues/7804
Closes https://github.com/curl/curl/pull/7803

4 years agoaws-sigv4: make signature work when post data is binary
Abhinav Singh [Tue, 12 Oct 2021 10:02:27 +0000 (15:32 +0530)] 
aws-sigv4: make signature work when post data is binary

User sets the post fields size for binary data.  Hence, we should not be
using strlen on it.

Added test 1937 and 1938 to verify.

Closes #7844

4 years agoMacOSX-Framework: remove redundant ';'
a1346054 [Sun, 19 Sep 2021 13:04:45 +0000 (13:04 +0000)] 
MacOSX-Framework: remove redundant ';'

Closes #7859

4 years agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 14 Oct 2021 21:04:27 +0000 (23:04 +0200)] 
RELEASE-NOTES: synced

4 years agoopenssl: with OpenSSL 1.1.0+ a failed RAND_status means goaway
Daniel Stenberg [Thu, 14 Oct 2021 11:57:53 +0000 (13:57 +0200)] 
openssl: with OpenSSL 1.1.0+ a failed RAND_status means goaway

One reason we know it can fail is if a provider is used that doesn't do
a proper job or is wrongly configured.

Reported-by: Michael Baentsch
Fixes #7840
Closes #7856

4 years agocmake: add CURL_ENABLE_SSL option and make CMAKE_USE_* SSL backend options depend...
Ryan Mast [Mon, 4 Oct 2021 00:58:28 +0000 (02:58 +0200)] 
cmake: add CURL_ENABLE_SSL option and make CMAKE_USE_* SSL backend options depend on it

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

4 years agohttp: remove assert that breaks hyper
Daniel Stenberg [Thu, 14 Oct 2021 08:38:22 +0000 (10:38 +0200)] 
http: remove assert that breaks hyper

Reported-by: Jay Satiro
Fixes #7852
Closes #7855

4 years agohttp_proxy: fix one more result assign for hyper
Daniel Stenberg [Thu, 14 Oct 2021 08:33:57 +0000 (10:33 +0200)] 
http_proxy: fix one more result assign for hyper

and remove the bad assert again, since it was run even with no error!

Closes #7854

4 years agosws: fix memory leak on exit
Jay Satiro [Wed, 13 Oct 2021 04:33:23 +0000 (00:33 -0400)] 
sws: fix memory leak on exit

- Free the allocated http request struct on cleanup.

Prior to this change if sws was built with leak sanitizer it would
report a memory leak error during testing.

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

4 years agoc-hyper: make Curl_http propagate errors better
Daniel Stenberg [Wed, 13 Oct 2021 07:15:48 +0000 (09:15 +0200)] 
c-hyper: make Curl_http propagate errors better

Pass on better return codes when errors occur within Curl_http instead
of insisting that CURLE_OUT_OF_MEMORY is the only possible one.

Pointed-out-by: Jay Satiro
Closes #7851

4 years agohttp_proxy: make hyper CONNECT() return the correct error code
Daniel Stenberg [Tue, 12 Oct 2021 15:11:20 +0000 (17:11 +0200)] 
http_proxy: make hyper CONNECT() return the correct error code

For every 'goto error', make sure the result variable holds the error
code for what went wrong.

Reported-by: Rafał Mikrut
Fixes #7825
Closes #7846

4 years agodocs/Makefile.am: repair 'make html'
Daniel Stenberg [Wed, 13 Oct 2021 22:20:28 +0000 (00:20 +0200)] 
docs/Makefile.am: repair 'make html'

by removing index.html which isn't around anymore

Closes #7853

4 years agocurl: correct grammar in generated libcurl code
Борис Верховский [Fri, 1 Oct 2021 14:57:00 +0000 (08:57 -0600)] 
curl: correct grammar in generated libcurl code

Closes #7802

4 years agotests: disable test 2043
Daniel Stenberg [Tue, 12 Oct 2021 14:05:13 +0000 (16:05 +0200)] 
tests: disable test 2043

It uses revoked.badssl.com which now is expired and therefor this now
permafails. We should not use external sites for tests, this test should
be converted to use our own infra.

Closes #7845