]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
3 years agourlapi: provide more detailed return codes 8049/head
Daniel Stenberg [Tue, 23 Nov 2021 16:07:31 +0000 (17:07 +0100)] 
urlapi: provide more detailed return codes

Previously, the return code CURLUE_MALFORMED_INPUT was used for almost
30 different URL format violations. This made it hard for users to
understand why a particular URL was not acceptable. Since the API cannot
point out a specific position within the URL for the problem, this now
instead introduces a number of additional and more fine-grained error
codes to allow the API to return more exactly in what "part" or section
of the URL a problem was detected.

Also bug-fixes curl_url_get() with CURLUPART_ZONEID, which previously
returned CURLUE_OK even if no zoneid existed.

Test cases in 1560 have been adjusted and extended. Tests 1538 and 1559
have been updated.

Updated libcurl-errors.3 and curl_url_strerror() accordingly.

Closes #8049

3 years agourlapi: make Curl_is_absolute_url always use MAX_SCHEME_LEN
Daniel Stenberg [Tue, 23 Nov 2021 13:16:38 +0000 (14:16 +0100)] 
urlapi: make Curl_is_absolute_url always use MAX_SCHEME_LEN

Instad of having all callers pass in the maximum length, always use
it. The passed in length is instead used only as the length of the
target buffer for to storing the scheme name in, if used.

Added the scheme max length restriction to the curl_url_set.3 man page.

Follow-up to 45bcb2eaa78c79

Closes #8047

3 years agocmake: warn on use of the now deprecated symbols
Jay Satiro [Wed, 24 Nov 2021 06:53:12 +0000 (07:53 +0100)] 
cmake: warn on use of the now deprecated symbols

Follow-up to 9108da2c26d

Closes #8052

3 years agotests/CI.md: add more information on CI environments
Kevin Burke [Tue, 16 Nov 2021 05:00:26 +0000 (21:00 -0800)] 
tests/CI.md: add more information on CI environments

Fixes #8012
Closes #8022

3 years agocmake: private identifiers use CURL_ instead of CMAKE_ prefix
Daniel Stenberg [Mon, 22 Nov 2021 16:39:46 +0000 (17:39 +0100)] 
cmake: private identifiers use CURL_ instead of CMAKE_ prefix

Since the 'CMAKE_' prefix is reserved for cmake's own private use.
Ref: https://cmake.org/cmake/help/latest/manual/cmake-variables.7.html

Reported-by: Boris Rasin
Fixes #7988
Closes #8044

3 years agourlapi: reject short file URLs
Daniel Stenberg [Mon, 22 Nov 2021 09:11:59 +0000 (10:11 +0100)] 
urlapi: reject short file URLs

file URLs that are 6 bytes or shorter are not complete. Return
CURLUE_MALFORMED_INPUT for those. Extended test 1560 to verify.

Triggered by #8041
Closes #8042

3 years agocurl: improve error message for --head with -J
Daniel Stenberg [Mon, 22 Nov 2021 17:09:43 +0000 (18:09 +0100)] 
curl: improve error message for --head with -J

... it now focuses on the "output of headers" combined with the
--remote-header-name option, as that is actually the problem. Both
--head and --include can output headers.

Reported-by: nimaje on github
Fixes #7987
Closes #8045

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 22 Nov 2021 22:11:40 +0000 (23:11 +0100)] 
RELEASE-NOTES: synced

3 years agourlapi: cleanup scheme parsing
Stefan Eissing [Mon, 22 Nov 2021 11:47:56 +0000 (12:47 +0100)] 
urlapi: cleanup scheme parsing

Makea Curl_is_absolute_url() always leave a defined 'buf' and avoids
copying on urls that do not start with a scheme.

Closes #8043

3 years agotool_operate: only set SSH related libcurl options for SSH URLs
Daniel Stenberg [Sun, 21 Nov 2021 14:52:58 +0000 (15:52 +0100)] 
tool_operate: only set SSH related libcurl options for SSH URLs

For example, this avoids trying to find and set the known_hosts file (or
warn for its absence) if SFTP or SCP are not used.

Closes #8040

3 years agorustls: remove comment about checking handshaking
Jacob Hoffman-Andrews [Fri, 19 Nov 2021 18:02:20 +0000 (10:02 -0800)] 
rustls: remove comment about checking handshaking

The comment is incorrect in two ways:
 - It says the check needs to be last, but the check is actually first.
 - is_handshaking actually starts out true.

Closes #8038

3 years agoopenssl: use non-deprecated API to read key parameters 7893/head
Marcel Raad [Mon, 11 Oct 2021 20:58:51 +0000 (22:58 +0200)] 
openssl: use non-deprecated API to read key parameters

With OpenSSL 3.0, the parameters are read directly from the `EVP_PKEY`
using `EVP_PKEY_get_bn_param`.

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

3 years agoopenssl: reduce code duplication
Marcel Raad [Mon, 11 Oct 2021 19:29:51 +0000 (21:29 +0200)] 
openssl: reduce code duplication

`BN_print`'s `BIGNUM` parameter has been `const` since OpenSSL 0.9.4.

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

3 years agoopenssl: remove `RSA_METHOD_FLAG_NO_CHECK` handling if unavailable
Marcel Raad [Mon, 11 Oct 2021 19:07:26 +0000 (21:07 +0200)] 
openssl: remove `RSA_METHOD_FLAG_NO_CHECK` handling if unavailable

The flag has been deprecated without replacement in OpenSSL 3.0.

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

3 years agoopenssl: remove usage of deprecated `SSL_get_peer_certificate`
Marcel Raad [Sun, 10 Oct 2021 09:51:37 +0000 (11:51 +0200)] 
openssl: remove usage of deprecated `SSL_get_peer_certificate`

The function name was changed to `SSL_get1_peer_certificate` in OpenSSL
3.0.

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

3 years agopage-footer: fix typo
Daniel Stenberg [Fri, 19 Nov 2021 16:11:30 +0000 (17:11 +0100)] 
page-footer: fix typo

Closes #8036

3 years agohttp: enable haproxy support for hyper backend
Daniel Stenberg [Fri, 19 Nov 2021 09:55:23 +0000 (10:55 +0100)] 
http: enable haproxy support for hyper backend

This is done by having native code do the haproxy header output before
hyper issues its request. The little downside with this approach is that
we need the entire Curl_buffer_send() function built, which is otherwise
not used for hyper builds.

If hyper ends up getting native support for the haproxy protocols we can
backpedal on this.

Enables test 1455 and 1456

Closes #8034

3 years agoconfigure: fix runtime-lib detection on macOS
Bernhard Walle [Wed, 17 Nov 2021 10:40:41 +0000 (11:40 +0100)] 
configure: fix runtime-lib detection on macOS

With a non-standard installation of openssl we get this error:

    checking run-time libs availability... failed
    configure: error: one or more libs available at link-time are not available run-time. Libs used at link-time: -lnghttp2 -lssl -lcrypto -lssl -lcrypto -lz

There's already code to set LD_LIBRARY_PATH on Linux, so set
DYLD_LIBRARY_PATH equivalent on macOS.

Closes #8028

3 years agocmake: don't set _USRDLL on a static Windows build
Don [Wed, 17 Nov 2021 21:21:28 +0000 (13:21 -0800)] 
cmake: don't set _USRDLL on a static Windows build

Closes #8030

3 years agopage-footer: document more environment variables
Daniel Stenberg [Wed, 17 Nov 2021 07:30:12 +0000 (08:30 +0100)] 
page-footer: document more environment variables

... that curl might use.

Closes #8027

3 years agonetrc.d: edit the .netrc example to look nicer
Daniel Stenberg [Tue, 16 Nov 2021 13:58:36 +0000 (14:58 +0100)] 
netrc.d: edit the .netrc example to look nicer

Works nicely thanks to d1828b470f43d

Closes #8025

3 years agotftp: mark protocol as not possible to do over CONNECT
Daniel Stenberg [Mon, 15 Nov 2021 15:51:32 +0000 (16:51 +0100)] 
tftp: mark protocol as not possible to do over CONNECT

... and make connect_init() refusing trying to tunnel protocols marked
as not working. Avoids a double-free.

Reported-by: Even Rouault
Fixes #8018
Closes #8020

3 years agodocs/cmdline-opts: do not say "protocols: all"
Daniel Stenberg [Mon, 15 Nov 2021 16:13:17 +0000 (17:13 +0100)] 
docs/cmdline-opts: do not say "protocols: all"

Remove the lines saying "protocols: all". It makes the output in the
manpage look funny, and the expectation is probably by default that if
not anything is mentioned about protocols the option apply to them all.

Closes #8021

3 years agocurl.1: require "see also" for every documented option
Daniel Stenberg [Mon, 15 Nov 2021 14:58:20 +0000 (15:58 +0100)] 
curl.1: require "see also" for every documented option

gen.pl now generates a warning if the "See Also" field is not filled in for a
command line option

All command line options now provide one or more related options. 167
"See alsos" added!

Closes #8019

3 years agoinsecure.d: expand and clarify
Daniel Stenberg [Mon, 15 Nov 2021 14:07:01 +0000 (15:07 +0100)] 
insecure.d: expand and clarify

Closes #8017

3 years agogen.pl: improve example output format
Daniel Stenberg [Mon, 15 Nov 2021 13:47:46 +0000 (14:47 +0100)] 
gen.pl: improve example output format

Treat consecutive lines that start with a space to be "examples". They
are output enclosed by .nf and .fi

Updated form.d to use this new fanciness

Closes #8016

3 years agoRevert "form-escape.d: double the back-slashes for proper man page output"
Daniel Stenberg [Mon, 15 Nov 2021 10:37:37 +0000 (11:37 +0100)] 
Revert "form-escape.d: double the back-slashes for proper man page output"

This reverts commit a2d8eac04a4eb1d5a98cf24b4e5cec5cec565d27.

silly me, it was intended to be one backslash!

3 years agoform-escape.d: double the back-slashes for proper man page output
Daniel Stenberg [Mon, 15 Nov 2021 10:36:58 +0000 (11:36 +0100)] 
form-escape.d: double the back-slashes for proper man page output

3 years agopage-footer: add a mention of how to report bugs to the man page
Daniel Stenberg [Mon, 15 Nov 2021 10:28:16 +0000 (11:28 +0100)] 
page-footer: add a mention of how to report bugs to the man page

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 15 Nov 2021 09:44:29 +0000 (10:44 +0100)] 
RELEASE-NOTES: synced

and bump to 7.81.0-DEV

3 years agomime: use percent-escaping for multipart form field and file names
Patrick Monnerat [Mon, 25 Oct 2021 10:58:37 +0000 (12:58 +0200)] 
mime: use percent-escaping for multipart form field and file names

Until now, form field and file names where escaped using the
backslash-escaping algorithm defined for multipart mails. This commit
replaces this with the percent-escaping method for URLs.

As this may introduce incompatibilities with server-side applications, a
new libcurl option CURLOPT_MIME_OPTIONS with bitmask
CURLMIMEOPT_FORMESCAPE is introduced to revert to legacy use of
backslash-escaping. This is controlled by new cli tool option
--form-escape.

New tests and documentation are provided for this feature.

Reported by: Ryan Sleevi
Fixes #7789
Closes #7805

3 years agozuul.d: update rustls-ffi to version 0.8.2
Kevin Burke [Mon, 15 Nov 2021 05:44:27 +0000 (21:44 -0800)] 
zuul.d: update rustls-ffi to version 0.8.2

This version fixes errors with ALPN negotiation in rustls, which is
necessary for HTTP/2 support. For more information see the rustls-ffi
changelog.

Closes #8013

3 years agoconfigure: better diagnostics if hyper is built wrong
Daniel Stenberg [Sat, 13 Nov 2021 10:44:34 +0000 (11:44 +0100)] 
configure: better diagnostics if hyper is built wrong

If hyper is indeed present in the specified directory but couldn't be
used to find the correct symbol, then offer a different error message to
better help the user understand the issue.

Suggested-by: Jacob Hoffman-Andrews
Fixes #8001
Closes #8005

3 years agotest1939: require proxy support to run
Daniel Stenberg [Sat, 13 Nov 2021 22:43:24 +0000 (23:43 +0100)] 
test1939: require proxy support to run

Follow-up to f0b7099a10d1a

Closes #8011

3 years agotest302[12]: run only with the libssh2 backend
Daniel Stenberg [Sat, 13 Nov 2021 22:10:42 +0000 (23:10 +0100)] 
test302[12]: run only with the libssh2 backend

... as the others don't support --hostpubsha256

Reported-by: Paul Howarth
Fixes #8009
Closes #8010

3 years agoruntests: make the SSH library a testable feature
Daniel Stenberg [Sat, 13 Nov 2021 22:08:35 +0000 (23:08 +0100)] 
runtests: make the SSH library a testable feature

libssh2, libssh and wolfssh

3 years agorustls: read of zero bytes might be okay
Jacob Hoffman-Andrews [Sat, 13 Nov 2021 03:33:19 +0000 (19:33 -0800)] 
rustls: read of zero bytes might be okay

When we're reading out plaintext from rustls' internal buffers, we might
get a read of zero bytes (meaning a clean TCP close, including
close_notify). However, we shouldn't return immediately when that
happens, since we may have already copied out some plaintext bytes.
Break out of the loop when we get a read of zero bytes, and figure out
which path we're dealing with.

Acked-by: Kevin Burke
Closes #8003

3 years agorustls: remove incorrect EOF check
Jacob Hoffman-Andrews [Sat, 13 Nov 2021 02:18:41 +0000 (18:18 -0800)] 
rustls: remove incorrect EOF check

The update to rustls-ffi 0.8.0 changed handling of EOF and close_notify.
From the CHANGELOG:

> Handling of unclean close and the close_notify TLS alert. Mirroring
> upstream changes, a rustls_connection now tracks TCP closed state like
> so: rustls_connection_read_tls considers a 0-length read from its
> callback to mean "TCP stream was closed by peer."  If that happens
> before the peer sent close_notify, rustls_connection_read will return
> RUSTLS_RESULT_UNEXPECTED_EOF once the available plaintext bytes are
> exhausted. This is useful to protect against truncation attacks. Note:
> some TLS implementations don't send close_notify. If you are already
> getting length information from your protocol (e.g. Content-Length in
> HTTP) you may choose to ignore UNEXPECTED_EOF so long as the number of
> plaintext bytes was as expected.

That means we don't need to check for unclean EOF in `cr_recv()`,
because `process_new_packets()` will give us an error if appropriate.

Closes #8003

3 years agolib1939: make it endure torture tests
Daniel Stenberg [Sat, 13 Nov 2021 13:13:20 +0000 (14:13 +0100)] 
lib1939: make it endure torture tests

Follow-up to f0b7099a10d1a

Closes #8007

3 years agoazure: make the "w/o HTTP/SMTP/IMAP" build disable SSL proper
Daniel Stenberg [Sat, 13 Nov 2021 10:50:59 +0000 (11:50 +0100)] 
azure: make the "w/o HTTP/SMTP/IMAP" build disable SSL proper

The configure line would previously depend on a configure mistake using
--without-openssl that is fixed and now this configure line needs
adjusting to use --without-ssl.

Follow-up to b589696f0312d

Closes #8006

3 years agoconfigure: add -lm to configure for rustls build.
Jacob Hoffman-Andrews [Sat, 13 Nov 2021 02:06:48 +0000 (18:06 -0800)] 
configure: add -lm to configure for rustls build.

Note: The list of libraries that rustc tells us we need to include is
longer, but also includes some more platform-specific libraries that I
am not sure how to effectively incorporate. Adding just -lm seems to
solve an immediate problem, so I'm adding just that.

Closes #8002

3 years agocurl_share_setopt.3: refer to CURLSHOPT_USERDATA(3) properly
Daniel Stenberg [Fri, 12 Nov 2021 14:27:04 +0000 (15:27 +0100)] 
curl_share_setopt.3: refer to CURLSHOPT_USERDATA(3) properly

3 years agocurl_share_setopt.3: split out options into their own manpages
Daniel Stenberg [Fri, 12 Nov 2021 09:56:05 +0000 (10:56 +0100)] 
curl_share_setopt.3: split out options into their own manpages

CURLSHOPT_LOCKFUNC.3
CURLSHOPT_SHARE.3
CURLSHOPT_UNLOCKFUNC.3
CURLSHOPT_UNSHARE.3
CURLSHOPT_USERDATA.3

Closes #7998

3 years agohttp_proxy: make Curl_connect_done() work for proxy disabled builds
Daniel Stenberg [Fri, 12 Nov 2021 07:08:34 +0000 (08:08 +0100)] 
http_proxy: make Curl_connect_done() work for proxy disabled builds

... by making it an empty macro then.

Follow-up to f0b7099a10d1a
Reported-by: Vincent Grande
Fixes #7995
Closes #7996

3 years agoCurl_connect_done: handle being called twice
Daniel Stenberg [Fri, 12 Nov 2021 12:34:49 +0000 (13:34 +0100)] 
Curl_connect_done: handle being called twice

Follow-up to f0b7099a10d1a7c

When torture testing 1021, it turns out the Curl_connect_done function
might be called twice and that previously then wrongly cleared the HTTP
pointer in the second invoke.

Closes #7999

3 years agoconfigure: don't enable TLS when --without-* flags are used
Stan Hu [Fri, 12 Nov 2021 00:24:57 +0000 (16:24 -0800)] 
configure: don't enable TLS when --without-* flags are used

Previously specifying `--without-gnutls` would unexpectedly attempt to
compile with GnuTLS, effectively interpreting this as
`--with-gnutls`. This caused a significant amount of confusion when
`libcurl` was built with SSL disabled since GnuTLS wasn't present.

68d89f24 dropped the `--without-*` options from the configure help, but
`AC_ARG_WITH` still defines these flags automatically. As
https://www.gnu.org/software/autoconf/manual/autoconf-2.60/html_node/External-Software.html
describes, the `action-if-given` is called when the user specifies
`--with-*` or `--without-*` options.

To prevent this confusion, we make the `--without` flag do the right
thing by ignoring the value if it set to "no".

Closes #7994

3 years agodocs/checksrc: Add documentation for STRERROR
Rikard Falkeborn [Thu, 11 Nov 2021 14:26:39 +0000 (15:26 +0100)] 
docs/checksrc: Add documentation for STRERROR

Closes #7991

3 years agovtls/rustls: adapt to the updated rustls_version proto
Daniel Stenberg [Thu, 4 Nov 2021 09:37:32 +0000 (10:37 +0100)] 
vtls/rustls: adapt to the updated rustls_version proto

Closes #7956

3 years agovtls/rustls: handle RUSTLS_RESULT_PLAINTEXT_EMPTY
Kevin Burke [Wed, 3 Nov 2021 05:50:07 +0000 (22:50 -0700)] 
vtls/rustls: handle RUSTLS_RESULT_PLAINTEXT_EMPTY

Previously we'd return CURLE_READ_ERROR if we received this, instead
of triggering the error handling logic that's present in the next if
block down.

After this change, curl requests to https://go.googlesource.com using
HTTP/2 complete successfully.

Fixes #7949
Closes #7948

3 years agozuul: update build environment for rustls-ffi 0.8.0
Kevin Burke [Tue, 9 Nov 2021 05:54:23 +0000 (21:54 -0800)] 
zuul: update build environment for rustls-ffi 0.8.0

3 years agovtls/rustls: update to compile with rustls-ffi v0.8.0
Kevin Burke [Wed, 3 Nov 2021 05:14:02 +0000 (22:14 -0700)] 
vtls/rustls: update to compile with rustls-ffi v0.8.0

Some method names, as well as the generated library name, were changed
in a recent refactoring.

Further, change the default configuration instructions to check for
Hyper in either "target/debug" or "target/release" - the latter
contains an optimized build configuration.

Fixes #7947
Closes #7948

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 11 Nov 2021 08:20:11 +0000 (09:20 +0100)] 
RELEASE-NOTES: synced

and bump the version to 7.80.1

3 years agomulti: shut down CONNECT in Curl_detach_connnection
Daniel Stenberg [Wed, 10 Nov 2021 13:42:04 +0000 (14:42 +0100)] 
multi: shut down CONNECT in Curl_detach_connnection

... to prevent a lingering pointer that would lead to a double-free.

Added test 1939 to verify.

Reported-by: Stephen M. Coakley
Fixes #7982
Closes #7986

4 years agocurl_easy_cleanup.3: remove from multi handle first
Daniel Stenberg [Wed, 10 Nov 2021 07:41:51 +0000 (08:41 +0100)] 
curl_easy_cleanup.3: remove from multi handle first

Easy handles that are used by the multi interface should be removed from
the multi handle before they are cleaned up.

Reported-by: Stephen M. Coakley
Ref: #7982
Closes #7983

4 years agourl.c: fix the SIGPIPE comment for Curl_close
Daniel Stenberg [Wed, 10 Nov 2021 08:26:40 +0000 (09:26 +0100)] 
url.c: fix the SIGPIPE comment for Curl_close

Closes #7984

4 years agoRELEASE-NOTES: synced curl-7_80_0
Daniel Stenberg [Wed, 10 Nov 2021 06:32:46 +0000 (07:32 +0100)] 
RELEASE-NOTES: synced

for curl 7.80.0

4 years agoTHANKS: add contributors from the 7.80.0 cycle
Daniel Stenberg [Wed, 10 Nov 2021 06:32:46 +0000 (07:32 +0100)] 
THANKS: add contributors from the 7.80.0 cycle

4 years agongtcp2: advertise h3 as well as h3-29
Tatsuhiro Tsujikawa [Tue, 9 Nov 2021 09:33:02 +0000 (18:33 +0900)] 
ngtcp2: advertise h3 as well as h3-29

Advertise h3 as well as h3-29 since some servers out there require h3
for QUIC v1.

Closes #7979

4 years agongtcp2: use QUIC v1 consistently
Tatsuhiro Tsujikawa [Tue, 9 Nov 2021 09:30:34 +0000 (18:30 +0900)] 
ngtcp2: use QUIC v1 consistently

Since we switched to v1 quic_transport_parameters codepoint in #7960
with quictls, lets use QUIC v1 consistently.

Closes #7979

4 years agongtcp2: compile with the latest nghttp3
Tatsuhiro Tsujikawa [Tue, 9 Nov 2021 08:33:55 +0000 (17:33 +0900)] 
ngtcp2: compile with the latest nghttp3

Closes #7978

4 years agotests: add Schannel-specific tests and disable unsupported ones
Marc Hoersken [Sat, 6 Nov 2021 15:14:17 +0000 (16:14 +0100)] 
tests: add Schannel-specific tests and disable unsupported ones

Adds Schannel variants of SSLpinning tests that include the option
--ssl-revoke-best-effort to ignore certificate revocation check
failures which is required due to our custom test CA certificate.

Disable the original variants if the Schannel backend is enabled.

Also skip all IDN tests which are broken while using an msys shell.

This is a step to simplify test exclusions for Windows and MinGW.

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

4 years agodocs: NAME fixes in easy option man pages
Daniel Stenberg [Mon, 8 Nov 2021 17:08:47 +0000 (18:08 +0100)] 
docs: NAME fixes in easy option man pages

Closes #7975

4 years agoftp: make the MKD retry to retry once per directory
Roger Young [Mon, 8 Nov 2021 18:20:23 +0000 (12:20 -0600)] 
ftp: make the MKD retry to retry once per directory

Reported-by: Roger Young
Fixes #7967
Closes #7976

4 years agotool_operate: reorder code to avoid compiler warning
Daniel Stenberg [Mon, 8 Nov 2021 11:46:44 +0000 (12:46 +0100)] 
tool_operate: reorder code to avoid compiler warning

tool_operate.c(889) : warning C4701: potentially uninitialized local
variable 'per' use

Follow-up to cc71d352651a0d95
Reported-by: Marc Hörsken
Bug: https://github.com/curl/curl/pull/7922#issuecomment-963042676
Closes #7971

4 years agocurl_easy_perform.3: add a para about recv and send data
Daniel Stenberg [Mon, 8 Nov 2021 13:48:11 +0000 (14:48 +0100)] 
curl_easy_perform.3: add a para about recv and send data

Reported-by: Godwin Stewart
Fixes #7973
Closes #7974

4 years agotool_operate: fclose stream only if fopened
Daniel Stenberg [Mon, 8 Nov 2021 13:13:30 +0000 (14:13 +0100)] 
tool_operate: fclose stream only if fopened

Fixes torture test failures
Follow-up to cc71d352651

Closes #7972

4 years agolibcurl-easy.3: language polish
Daniel Stenberg [Mon, 8 Nov 2021 13:43:13 +0000 (14:43 +0100)] 
libcurl-easy.3: language polish

4 years agolimit-rate.d: this is average over several seconds
Daniel Stenberg [Sat, 6 Nov 2021 11:44:52 +0000 (12:44 +0100)] 
limit-rate.d: this is average over several seconds

Closes #7970

4 years agodocs: reduce/avoid English contractions
Daniel Stenberg [Sun, 31 Oct 2021 15:34:44 +0000 (16:34 +0100)] 
docs: reduce/avoid English contractions

You're => You are
Hasn't => Has not
Doesn't => Does not
Don't => Do not
You'll => You will
etc

Closes #7930

4 years agotool_operate: fix torture leaks with etags
Daniel Stenberg [Fri, 5 Nov 2021 22:20:14 +0000 (23:20 +0100)] 
tool_operate: fix torture leaks with etags

Spotted by torture testing 343 344 345 347.

Follow-up from cc71d352651a0
Pointed-out-by: Dan Fandrich
Closes #7969

4 years agongtcp2: support latest QUIC TLS RFC9001
Amaury Denoyelle [Thu, 4 Nov 2021 16:20:23 +0000 (17:20 +0100)] 
ngtcp2: support latest QUIC TLS RFC9001

QUIC Transport Parameters Extension has been changed between draft-29
and latest RFC9001. Most notably, its identifier has been updated from
0xffa5 to 0x0039. The version is selected through the QUIC TLS library
via the legacy codepoint.

Disable the usage of legacy codepoint in curl to switch to latest
RFC9001. This is required to be able to keep up with latest QUIC
implementations.

Acked-by: Tatsuhiro Tsujikawa
Closes #7960

4 years agotest1173: make manpage-syntax.pl spot \n errors in examples
Daniel Stenberg [Thu, 4 Nov 2021 22:54:34 +0000 (23:54 +0100)] 
test1173: make manpage-syntax.pl spot \n errors in examples

4 years agoman pages: fix backslash-n in examples
Daniel Stenberg [Thu, 4 Nov 2021 22:48:23 +0000 (23:48 +0100)] 
man pages: fix backslash-n in examples

... to be proper backslash-backslash-n sequences to render nicely in man
and on website.

Follow-up to 24155569d8a
Reported-by: Sergey Markelov
Fixes https://github.com/curl/curl-www/issues/163
Closes #7962

4 years agoscripts/release-notes.pl: use out of repo links verbatim in refs
Daniel Stenberg [Thu, 4 Nov 2021 23:09:51 +0000 (00:09 +0100)] 
scripts/release-notes.pl: use out of repo links verbatim in refs

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