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
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.
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.
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
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
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
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.
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.
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.
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.
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 ...").
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>
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.
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.
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).
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.