]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
2 years agotests/data/CMakeLists: remove making the 'show' makefile target 9337/head
Daniel Stenberg [Thu, 18 Aug 2022 09:40:11 +0000 (11:40 +0200)] 
tests/data/CMakeLists: remove making the 'show' makefile target

It is not used by runtests since 3c0f462

Closes #9333

2 years agotests/data/Makefile: remove 'filecheck' target
Daniel Stenberg [Thu, 18 Aug 2022 07:09:45 +0000 (09:09 +0200)] 
tests/data/Makefile: remove 'filecheck' target

No practical use anymore since 3c0f4622cdfd6

Closes #9332

2 years agolibssh2: make atime/mtime date overflow return error
Daniel Stenberg [Wed, 17 Aug 2022 08:51:42 +0000 (10:51 +0200)] 
libssh2: make atime/mtime date overflow return error

Closes #9328

2 years agolibssh: make atime/mtime date overflow return error
Daniel Stenberg [Wed, 17 Aug 2022 08:51:07 +0000 (10:51 +0200)] 
libssh: make atime/mtime date overflow return error

Closes #9328

2 years agoexamples/curlx.c: remove
Daniel Stenberg [Wed, 17 Aug 2022 22:00:12 +0000 (00:00 +0200)] 
examples/curlx.c: remove

This example is a bit convoluted to use as an example, combined with the
special license for it makes it unsuitable.

Closes #9330

2 years agocurl.h: include <sys/select.h> on SunOS
Tobias Nygren [Wed, 17 Aug 2022 10:03:41 +0000 (12:03 +0200)] 
curl.h: include <sys/select.h> on SunOS

It is needed for fd_set to be visible to downstream consumers that use
<curl/multi.h>. Header is known to exist at least as far back as Solaris
2.6.

Closes #9329

2 years agoDEPRECATE.md: push the NSS deprecation date forward one year to 2023
Daniel Stenberg [Wed, 17 Aug 2022 08:06:11 +0000 (10:06 +0200)] 
DEPRECATE.md: push the NSS deprecation date forward one year to 2023

URL: https://curl.se/mail/lib-2022-08/0016.html

2 years agolibssh2: setting atime or mtime >32bit on 4-bytes-long systems
Daniel Stenberg [Tue, 16 Aug 2022 14:29:15 +0000 (16:29 +0200)] 
libssh2: setting atime or mtime >32bit on 4-bytes-long systems

Since the libssh2 API uses 'long' to store the timestamp, it cannot
transfer >32bit times on Windows and 32bit architecture builds.

Avoid nasty surprises by instead not setting such time.

Spotted by Coverity

Closes #9325

2 years agolibssh: setting atime or mtime > 32bit is now just skipped
Daniel Stenberg [Tue, 16 Aug 2022 14:22:51 +0000 (16:22 +0200)] 
libssh: setting atime or mtime > 32bit is now just skipped

The libssh API used caps the time to an unsigned 32bit variable. Avoid
nasty surprises by instead not setting such time.

Spotted by Coverity.

Closes #9324

2 years agoKNOWN_BUGS: Windows Unicode builds use homedir in current locale
Jay Satiro [Sat, 13 Aug 2022 07:47:12 +0000 (03:47 -0400)] 
KNOWN_BUGS: Windows Unicode builds use homedir in current locale

Bug: https://github.com/curl/curl/pull/7252
Reported-by: dEajL3kA@users.noreply.github.com
Ref: https://github.com/curl/curl/pull/7281

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

2 years agotest399: switch it to use a config file instead
Daniel Stenberg [Tue, 16 Aug 2022 12:01:29 +0000 (14:01 +0200)] 
test399: switch it to use a config file instead

... as using a 65535 bytes host name in a URL does not fit on the
command line on some systems - like Windows.

Reported-by: Marcel Raad
Fixes #9321
Closes #9322

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 16 Aug 2022 07:46:33 +0000 (09:46 +0200)] 
RELEASE-NOTES: synced

2 years agoasyn-ares: make a single alloc out of hostname + async data
Daniel Stenberg [Mon, 15 Aug 2022 14:49:44 +0000 (16:49 +0200)] 
asyn-ares: make a single alloc out of hostname + async data

This saves one alloc per name resolve and simplifies the exit path.

Closes #9310

2 years agoCurl_close: call Curl_resolver_cancel to avoid memory-leak
Daniel Stenberg [Mon, 15 Aug 2022 14:36:33 +0000 (16:36 +0200)] 
Curl_close: call Curl_resolver_cancel to avoid memory-leak

There might be a pending (c-ares) resolve that isn't free'd up yet.

Closes #9310

2 years agoasyn-thread: fix socket leak on OOM
Daniel Stenberg [Sun, 14 Aug 2022 21:52:12 +0000 (23:52 +0200)] 
asyn-thread: fix socket leak on OOM

Closes #9310

2 years agoGHA: mv CI torture test from Zuul
Daniel Stenberg [Sat, 13 Aug 2022 21:59:51 +0000 (23:59 +0200)] 
GHA: mv CI torture test from Zuul

Closes #9310

2 years agongtcp2-wolfssl.yml: add GHA to build ngtcp2 + wolfSSL
Daniel Stenberg [Mon, 15 Aug 2022 07:40:35 +0000 (09:40 +0200)] 
ngtcp2-wolfssl.yml: add GHA to build ngtcp2 + wolfSSL

Closes #9318

2 years agotest399: verify check of too long host name
Daniel Stenberg [Mon, 15 Aug 2022 08:05:19 +0000 (10:05 +0200)] 
test399: verify check of too long host name

2 years agourl: reject URLs with hostnames longer than 65535 bytes
Daniel Stenberg [Mon, 15 Aug 2022 07:17:24 +0000 (09:17 +0200)] 
url: reject URLs with hostnames longer than 65535 bytes

It *probably* causes other problems too since DNS can't resolve such
long names, but the SNI field in TLS is limited to 16 bits length.

Closes #9317

2 years agocurl_multi_perform.3: minor language fix
Daniel Stenberg [Mon, 15 Aug 2022 06:59:30 +0000 (08:59 +0200)] 
curl_multi_perform.3: minor language fix

Closes #9316

2 years agongtcp2: fix picky compiler warnings with wolfSSL for QUIC
Daniel Stenberg [Mon, 15 Aug 2022 06:53:11 +0000 (08:53 +0200)] 
ngtcp2: fix picky compiler warnings with wolfSSL for QUIC

Follow-up to 8a13be227eede2

Closes #9315

2 years agongtcp2: remove leftover variable
Daniel Stenberg [Mon, 15 Aug 2022 06:20:49 +0000 (08:20 +0200)] 
ngtcp2: remove leftover variable

Mistake leftover from my edit before push.

Follow-up from 8a13be227eede2601c2b3b
Reported-by: Viktor Szakats
Bug: https://github.com/curl/curl/pull/9290#issuecomment-1214569167

2 years agoMakefile.m32: allow -nghttp3/-ngtcp2 without -ssl [ci skip]
Viktor Szakats [Mon, 15 Aug 2022 02:49:59 +0000 (02:49 +0000)] 
Makefile.m32: allow -nghttp3/-ngtcp2 without -ssl [ci skip]

Before this patch `-nghttp3`/`-ngtcp2` had an effect only when `-ssl`
was also enabled. `-ssl` meaning OpenSSL (and its forks). After
8a13be227eede2601c2b3b1c63e08b3dc9b35dd5 nghttp3/ngtcp2 can also be
used together with wolfSSL. This patch adds the ability to enable
`-nghttp3`/`-ngtcp2` independently from `-ssl` (OpenSSL), allowing to
use it with wolfSSL or other, future TLS backends.

Before this patch, it was fine to enable `-nghttp3`/`-ngtcp2`
unconditionally. After this patch, this is no longer the case, and now
it's the user's responsibility to enable `-nghttp3`/`-ngtcp2` only
together with a compatible TLS backend.

When using a TLS backend other than OpenSSL, the TLS-specific ngtcp2
library must be configured manually, e.g.:
  `export CURL_LDFLAG_EXTRAS=-lngtcp2_crypto_wolfssl`

(or via `NGTCP2_LIBS`)

Closes #9314

2 years agoquic: add support via wolfSSL
Stefan Eissing [Wed, 10 Aug 2022 08:06:52 +0000 (10:06 +0200)] 
quic: add support via wolfSSL

- based on ngtcp2 PR https://github.com/ngtcp2/ngtcp2/pull/505
- configure adapted to build against ngtcp2 wolfssl crypto lib
- quic code added for creation of WOLFSSL* instances

Closes #9290

2 years agomemdebug: add annotation attributes
David Carlier [Sat, 13 Aug 2022 14:17:12 +0000 (15:17 +0100)] 
memdebug: add annotation attributes

memory debug tracking annotates whether the returned pointer does not
`alias`, hints where the size required is, for Windows to be better
debugged via Visual Studio.

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

2 years agoGHA: move libressl CI from zuul to GitHub
Daniel Stenberg [Sat, 13 Aug 2022 21:53:56 +0000 (23:53 +0200)] 
GHA: move libressl CI from zuul to GitHub

Closes #9309

2 years agoKNOWN_BUGS: FTPS directory listing hangs on Windows with Schannel
Daniel Stenberg [Fri, 12 Aug 2022 22:32:12 +0000 (00:32 +0200)] 
KNOWN_BUGS: FTPS directory listing hangs on Windows with Schannel

Closes #9161

2 years agoKNOWN_BUGS: CURLOPT_CERTINFO results in CURLE_OUT_OF_MEMORY with Schannel
Daniel Stenberg [Fri, 12 Aug 2022 22:27:57 +0000 (00:27 +0200)] 
KNOWN_BUGS: CURLOPT_CERTINFO results in CURLE_OUT_OF_MEMORY with Schannel

Closes #8741

2 years agoKNOWN_BUGS: libssh blocking and infinite loop problem
Daniel Stenberg [Fri, 12 Aug 2022 22:25:31 +0000 (00:25 +0200)] 
KNOWN_BUGS: libssh blocking and infinite loop problem

Closes #8632

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 12 Aug 2022 22:22:25 +0000 (00:22 +0200)] 
RELEASE-NOTES: synced

2 years agomsh3: fix the QUIC disconnect function
Daniel Stenberg [Fri, 12 Aug 2022 12:22:03 +0000 (14:22 +0200)] 
msh3: fix the QUIC disconnect function

And free request related memory better in 'done'. Fixes a memory-leak.

Reported-by: Gisle Vanem
Fixes #8915
Closes #9304

2 years agoconnect: close the happy eyeballs loser connection when using QUIC
Daniel Stenberg [Fri, 12 Aug 2022 12:20:52 +0000 (14:20 +0200)] 
connect: close the happy eyeballs loser connection when using QUIC

Reviewed-by: Nick Banks
Closes #9303

2 years agorefactor: split resolve_server() into functions
Emil Engler [Mon, 8 Aug 2022 21:58:20 +0000 (23:58 +0200)] 
refactor: split resolve_server() into functions

This commit splits the branch-heavy resolve_server() function into
various sub-functions, in order to reduce the amount of nested
if/else-statements.

Beside this, it also removes many else-sequences, by returning in the
previous if-statement.

Closes #9283

2 years agoschannel: re-indent to use curl style better
Daniel Stenberg [Fri, 12 Aug 2022 08:48:29 +0000 (10:48 +0200)] 
schannel: re-indent to use curl style better

Only white space changes

Closes #9301

2 years agodocs/cmdline-opts: fix example and categories for --form-escape
Emanuele Torre [Fri, 12 Aug 2022 03:18:10 +0000 (05:18 +0200)] 
docs/cmdline-opts: fix example and categories for --form-escape

The example was missing a "--form" argument
I also replaced "--form" with "-F" to shorten the line a bit since it
was already very long.

And I also moved --form-escape from the "post" category to the "upload"
category (this is what I originally wanted to fix, before also noticing
the mistake in the example).

Closes #9298

2 years agoHTTP3.md: update to msh3 v0.4.0
Nick Banks [Thu, 11 Aug 2022 14:25:52 +0000 (10:25 -0400)] 
HTTP3.md: update to msh3 v0.4.0

Closes #9297

2 years agohostip: resolve *.localhost to 127.0.0.1/::1
Daniel Stenberg [Thu, 11 Aug 2022 09:32:22 +0000 (11:32 +0200)] 
hostip: resolve *.localhost to 127.0.0.1/::1

Following the footsteps of other clients like Firefox/Chrome.  RFC 6761
says clients SHOULD do this.

Add test 389 to verify.

Reported-by: TheKnarf on github
Fixes #9192
Closes #9296

2 years agoKNOWN_BUGS: long paths are not fully supported on Windows
Jay Satiro [Wed, 10 Aug 2022 07:23:25 +0000 (03:23 -0400)] 
KNOWN_BUGS: long paths are not fully supported on Windows

Bug: https://github.com/curl/curl/issues/8361
Reported-by: Gisle Vanem
Closes https://github.com/curl/curl/pull/9288

2 years agoconfig: remove the check for and use of SIZEOF_SHORT
Daniel Stenberg [Thu, 11 Aug 2022 07:07:06 +0000 (09:07 +0200)] 
config: remove the check for and use of SIZEOF_SHORT

shorts are 2 bytes on all platforms curl runs and have ever run on.

Closes #9291

2 years agoconfigure: introduce CURL_SIZEOF
Daniel Stenberg [Thu, 11 Aug 2022 07:07:02 +0000 (09:07 +0200)] 
configure: introduce CURL_SIZEOF

This is a rewrite of the previously used GPLv3+exception licensed
file. With this change, there is no more reference to GPL so we can
remove that from LICENSES/.

Ref: #9220
Closes #9291

2 years agohyper: customize test1274 to how hyper unfolds headers
Sean McArthur [Thu, 28 Jul 2022 01:15:22 +0000 (18:15 -0700)] 
hyper: customize test1274 to how hyper unfolds headers

Closes #9217

2 years agocurl-config: quote directories with potential space
Orgad Shaneh [Fri, 5 Aug 2022 09:46:32 +0000 (12:46 +0300)] 
curl-config: quote directories with potential space

On Windows (at least with CMake), the default prefix is
C:/Program Files (x86)/CURL.

Closes #9253

2 years agoamigaos: fix threaded resolver on AmigaOS 4.x
Futaura [Sun, 7 Aug 2022 13:42:19 +0000 (14:42 +0100)] 
amigaos: fix threaded resolver on AmigaOS 4.x

Replace ip4 resolution function on AmigaOS 4.x, as it requires runtime
feature detection and extra code to make it thread safe.

Closes #9265

2 years agoimap: use ISALNUM() for alphanumeric checks
Emil Engler [Wed, 10 Aug 2022 07:35:38 +0000 (09:35 +0200)] 
imap: use ISALNUM() for alphanumeric checks

This commit replaces a self-made character check for alphanumeric
characters within imap_is_bchar() with the ISALNUM() macro, as it is
reduces the size of the code and makes the performance better, due to
ASCII arithmetic.

Closes #9289

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 10 Aug 2022 06:46:05 +0000 (08:46 +0200)] 
RELEASE-NOTES: synced

2 years agoconnect: add quic connection information
Cering [Wed, 10 Aug 2022 04:27:09 +0000 (12:27 +0800)] 
connect: add quic connection information

Fixes #9286
Closes #9287

2 years agocirrus/freebsd-ci: bootstrap the pip installer
Philip H [Tue, 26 Jul 2022 20:37:56 +0000 (22:37 +0200)] 
cirrus/freebsd-ci: bootstrap the pip installer

Signed-off-by: Philip H <47042125+pheiduck@users.noreply.github.com>
Closes #9213

2 years agourldata: move smaller fields down in connectdata struct
Daniel Stenberg [Mon, 8 Aug 2022 12:41:01 +0000 (14:41 +0200)] 
urldata: move smaller fields down in connectdata struct

By (almost) sorting the struct fields in connectdata in a decending size
order, having the single char ones last, we reduce the number of holes
in the struct and thus the amount of storage needed.

Closes #9280

2 years agoldap: adapt to conn->port now being an 'int'
Daniel Stenberg [Mon, 8 Aug 2022 14:23:03 +0000 (16:23 +0200)] 
ldap: adapt to conn->port now being an 'int'

Remove typecasts. Fix printf() formats.

Follow-up from 764c6bd3bf.
Pointed out by Coverity CID 1507858.

Closes #9281

2 years agoKNOWN_BUGS: Negotiate authentication against Hadoop HDFS
Daniel Stenberg [Mon, 8 Aug 2022 14:45:51 +0000 (16:45 +0200)] 
KNOWN_BUGS: Negotiate authentication against Hadoop HDFS

Closes #8264

2 years agofile: add handling of native AmigaOS paths
Futaura [Fri, 5 Aug 2022 11:38:30 +0000 (12:38 +0100)] 
file: add handling of native AmigaOS paths

On AmigaOS 4.x, handle native absolute paths, whilst blocking relative
paths. Also allow unix style paths if feature enabled at link time.

Inspiration-from: Michael Trebilcock

Closes #9259

2 years agoKNOWN_BUGS: cmake build is not thread-safe
Daniel Stenberg [Mon, 8 Aug 2022 14:00:17 +0000 (16:00 +0200)] 
KNOWN_BUGS: cmake build is not thread-safe

The cmake build does not check for and verify presence of a working
Atomic type, which then makes curl_global_init() to not build
thread-safe on non-Windows platforms.

Closes https://github.com/curl/curl/issues/8973
Closes https://github.com/curl/curl/pull/8982

2 years agoconfigure: fixup bsdsocket detection code for AmigaOS 4.x
Futaura [Sun, 7 Aug 2022 16:15:16 +0000 (17:15 +0100)] 
configure: fixup bsdsocket detection code for AmigaOS 4.x

The code that detects bsdsocket.library for AmigaOS did not work
for AmigaOS 4.x. This has been fixed and also cleaned up a little
to reduce duplication. Wasn't technically necessary before, but is
required when building with AmiSSL instead of OpenSSL.

Closes #9268

2 years agotool: reintroduce set file comment code for AmigaOS
Futaura [Fri, 5 Aug 2022 09:48:24 +0000 (10:48 +0100)] 
tool: reintroduce set file comment code for AmigaOS

Amiga specific code which put the URL in the file comment was perhaps
accidentally removed in b88940850002a3f1c25bc6488b95ad30eb80d696 having
originally been added in 5c215bdbdfde8b2350cdcbac82aae0c914da5314.
Reworked to fit the code changes and added it back in.

Reported-by: Michael Trebilcock
Originally-added-by: Chris Young
Closes #9258

2 years agourldata: make 'negnpn' use less storage
Daniel Stenberg [Mon, 8 Aug 2022 11:21:01 +0000 (13:21 +0200)] 
urldata: make 'negnpn' use less storage

The connectdata struct field 'negnpn' never holds a value larger than
30, so an unsigned char saves 3 bytes struct space.

Closes #9279

2 years agourldata: make three *_proto struct fields smaller
Daniel Stenberg [Mon, 8 Aug 2022 11:16:52 +0000 (13:16 +0200)] 
urldata: make three *_proto struct fields smaller

Use 'unsigned char' for storage instead of the enum, for three GSSAPI
related fields in the connectdata struct.

Closes #9278

2 years agoconnect: set socktype/protocol correctly
Daniel Stenberg [Mon, 8 Aug 2022 10:36:41 +0000 (12:36 +0200)] 
connect: set socktype/protocol correctly

So that an address used from the DNS cache that was previously used for
QUIC can be reused for TCP and vice versa.

To make this possible, set conn->transport to "unix" for unix domain
connections ... and store the transport struct field in an unsigned char
to use less space.

Reported-by: ウさん
Fixes #9274
Closes #9276

2 years agoamissl: allow AmiSSL to be used with AmigaOS 4.x builds
Futaura [Sun, 7 Aug 2022 16:04:47 +0000 (17:04 +0100)] 
amissl: allow AmiSSL to be used with AmigaOS 4.x builds

Enable AmiSSL to be used instead of static OpenSSL link libraries.
for AmigaOS 4.x, as it already is in the AmigaOS 3.x build.

Closes #9269

2 years agoopenssl: add details to "unable to set client certificate" error
opensignature [Sat, 30 Jul 2022 13:14:06 +0000 (15:14 +0200)] 
openssl: add details to "unable to set client certificate" error

from: "curl: (58) unable to set client certificate"

to: curl: (58) unable to set client certificate [error:0A00018F:SSL
routines::ee key too small]

Closes #9228

2 years agoamissl: make AmiSSL v5 a minimum requirement
Futaura [Sun, 7 Aug 2022 14:03:32 +0000 (15:03 +0100)] 
amissl: make AmiSSL v5 a minimum requirement

AmiSSL v5 is the latest version, featuring a port of OpenSSL 3.0.
Support for previous OpenSSL 1.1.x versions has been dropped, so
makes sense to enforce v5 as the minimum requirement. This also
allows all the AmiSSL stub workarounds to be removed as they are
now provided in a link library in the AmiSSL SDK.

Closes #9267

2 years agoconfigure: -pthread not available on AmigaOS 4.x
Futaura [Sun, 7 Aug 2022 14:42:35 +0000 (15:42 +0100)] 
configure: -pthread not available on AmigaOS 4.x

The most recent GCC builds for AmigaOS 4.x do not allow -pthread and
exit with an error. Instead, need to explictly specify -lpthread.

Closes #9266

2 years agodigest: pass over leading spaces in qop values
Daniel Stenberg [Sun, 7 Aug 2022 22:30:58 +0000 (00:30 +0200)] 
digest: pass over leading spaces in qop values

When parsing the "qop=" parameter of the digest authentication, and the
value is provided within quotes, the list of values can have leading
white space which the parser previously did not handle correctly.

Add test case 388 to verify.

Reported-by: vlubart on github
Fixes #9264
Closes #9270

2 years agodigest: reject broken header with session protocol but without qop
Evgeny Grin (Karlson2k) [Thu, 30 Jun 2022 15:30:21 +0000 (18:30 +0300)] 
digest: reject broken header with session protocol but without qop

Closes #9077

2 years agoCURLINFO_SPEED_UPLOAD/DOWNLOAD.3: fix examples
Daniel Stenberg [Tue, 2 Aug 2022 14:15:55 +0000 (16:15 +0200)] 
CURLINFO_SPEED_UPLOAD/DOWNLOAD.3: fix examples

Reported-by: jvvprasad78 on github
Assisted-by: Jay Satiro
Fixes #9239
Closes #9241

2 years agotest44[2-4]: add '--resolve' to the keywords
Fabian Keil [Tue, 2 Aug 2022 18:33:11 +0000 (20:33 +0200)] 
test44[2-4]: add '--resolve' to the keywords

... so the tests can be automatically skipped when
using an external proxy like Privoxy.

Closes #9250

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sun, 7 Aug 2022 12:14:42 +0000 (14:14 +0200)] 
RELEASE-NOTES: synced

2 years agoCURLOPT_CONNECT_ONLY.3: clarify multi API use
Daniel Stenberg [Sat, 6 Aug 2022 22:25:30 +0000 (00:25 +0200)] 
CURLOPT_CONNECT_ONLY.3: clarify multi API use

Reported-by: Maxim Ivanov
Fixes #9244
Closes #9262

2 years agocurl_easy_header: Add CURLH_PSEUDO to sanity check
Andrew Lambert [Sun, 31 Jul 2022 21:21:09 +0000 (14:21 -0700)] 
curl_easy_header: Add CURLH_PSEUDO to sanity check

Fixes #9235
Closes #9236

2 years agodocs: add dns category to --resolve
Emil Engler [Sat, 30 Jul 2022 19:55:04 +0000 (21:55 +0200)] 
docs: add dns category to --resolve

This commit adds the dns category to the --resolve command line option,
because it can be interpreted as both: a low-level connection option and
an option related to the resolving of a hostname.

It is also not common for dns options to belong to the connection
category and vice versa.  --ipv4 and --ipv6 are both good examples.

Closes #9229

3 years agoschannel: Add TLS 1.3 support
Wyatt O'Day [Fri, 22 Jul 2022 14:45:28 +0000 (10:45 -0400)] 
schannel: Add TLS 1.3 support

- Support TLS 1.3 as the default max TLS version for Windows Server 2022
  and Windows 11.

- Support specifying TLS 1.3 ciphers via existing option
  CURLOPT_TLS13_CIPHERS (tool: --tls13-ciphers).

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

3 years agocmdline-opts/gen.pl: improve performance
Emil Engler [Sat, 30 Jul 2022 20:36:55 +0000 (22:36 +0200)] 
cmdline-opts/gen.pl: improve performance

On some systems, the gen.pl script takes nearly two minutes for the
generation of the main-page, which is a completely unacceptable time.

The slow performance has two causes:
1. Use of a regex locale operator
2. Useless invokations of loops

The commit addresses the first issue by replacing the "\W" wiht
[^a-zA-Z0-9_], which is, according to regex101.com, functionally
equivalent to the previous operation, except that it is obviously
limited to ASCII only, which is fine, as the curl project is
English-only anyway.

The second issue is being addressed by only running the loop if the line
contains a "--" in it. The loop may be completeley removed in the
future.

Co-authored-by: Emanuele Torre <torreemanuele6@gmail.com>
See #8299
Fixes #9230
Closes #9232

3 years agodocs/cmdline: mark fail and fail-with-body as mutually exclusive
Daniel Stenberg [Thu, 28 Jul 2022 19:02:45 +0000 (21:02 +0200)] 
docs/cmdline: mark fail and fail-with-body as mutually exclusive

Reported-by: Andreas Sommer
Fixes #9221
Closes #9222

3 years agoquiche: fix build failure
Nao Yonashiro [Fri, 29 Jul 2022 08:43:01 +0000 (17:43 +0900)] 
quiche: fix build failure

Reviewed-by: Alessandro Ghedini
Closes #9223

3 years agoconfigure.ac: drop references to deleted functions
Viktor Szakats [Tue, 2 Aug 2022 12:20:20 +0000 (12:20 +0000)] 
configure.ac: drop references to deleted functions

follow-up from 4d73854462f30948acab12984b611e9e33ee41e6

Reported-by: Oliver Roberts
Fixes #9238
Closes #9240

3 years agohyper: enable obs-folded multiline headers
Sean McArthur [Wed, 27 Jul 2022 15:23:41 +0000 (08:23 -0700)] 
hyper: enable obs-folded multiline headers

Closes #9216

3 years agoconnect: revert the use of IP*_RECVERR
Daniel Stenberg [Tue, 26 Jul 2022 22:42:42 +0000 (00:42 +0200)] 
connect: revert the use of IP*_RECVERR

The options were added in #6341 and d13179d, but cause problems: Lots of
POLLIN event occurs but recvfrom read nothing.

Reported-by: Tatsuhiro Tsujikawa
Fixes #9209
Closes #9215

3 years agodocs: remove him/her/he/she from documentation
Marco Kamner [Wed, 27 Jul 2022 11:52:53 +0000 (13:52 +0200)] 
docs: remove him/her/he/she from documentation

Closes #9208

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 27 Jul 2022 10:34:31 +0000 (12:34 +0200)] 
RELEASE-NOTES: synced

3 years agotool_getparam: make --doh-url "" switch it off
Daniel Stenberg [Tue, 26 Jul 2022 09:00:31 +0000 (11:00 +0200)] 
tool_getparam: make --doh-url "" switch it off

A possible future addition could be to parse the URL first too to verify
that it is valid before trying to use it.

Assisted-by: Jay Satiro
Closes #9207

3 years agomailmap: add rzrymiak on github
Daniel Stenberg [Tue, 26 Jul 2022 21:15:45 +0000 (23:15 +0200)] 
mailmap: add rzrymiak on github

3 years agongtcp2: Fix build error due to change in nghttp3 prototypes
Jay Satiro [Mon, 25 Jul 2022 17:53:39 +0000 (13:53 -0400)] 
ngtcp2: Fix build error due to change in nghttp3 prototypes

ngtcp2/nghttp3@4a066b2 changed nghttp3_conn_block_stream and
nghttp3_conn_shutdown_stream_write return from int to void.

Reported-by: jurisuk@users.noreply.github.com
Fixes https://github.com/curl/curl/issues/9204
Closes https://github.com/curl/curl/pull/9200

3 years agoBUGS.md: improve language
rzrymiak [Tue, 26 Jul 2022 04:39:57 +0000 (21:39 -0700)] 
BUGS.md: improve language

Closes #9205

3 years agocirrus.yml: replace py38-pip with py39-pip
Philip H [Mon, 25 Jul 2022 20:08:24 +0000 (22:08 +0200)] 
cirrus.yml: replace py38-pip with py39-pip

Reported-by: Jay Satiro
Fixes #9201
Closes #9202

3 years agotool_getparam: fix cleanarg() for unicode builds
Daniel Stenberg [Sat, 23 Jul 2022 11:33:57 +0000 (13:33 +0200)] 
tool_getparam: fix cleanarg() for unicode builds

Use the correct type, and make cleanarg an empty macro if the cleaning
ability is absent.

Fixes #9195
Closes #9196

Reviewed-by: Jay Satiro
Reviewed-by: Marcel Raad
3 years agotest3026: add support for Windows using native Win32 threads 9212/head
Marc Hoersken [Tue, 14 Jun 2022 19:55:15 +0000 (21:55 +0200)] 
test3026: add support for Windows using native Win32 threads

Reviewed-by: Viktor Szakats
Reviewed-by: Jay Satiro
Reviewed-by: Daniel Stenberg
Follow up to 7ade9c50b35d95d47a43880c3097bebab7a7e690
Closes #9012

3 years agodigest: fix memory leak, fix not quoted 'opaque'
Evgeny Grin (Karlson2k) [Mon, 25 Jul 2022 11:36:16 +0000 (14:36 +0300)] 
digest: fix memory leak, fix not quoted 'opaque'

Fix leak regression introduced by 3a6fe0c.

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

3 years agotests: several enumerated type cleanups
Daniel Stenberg [Wed, 20 Jul 2022 23:04:39 +0000 (01:04 +0200)] 
tests: several enumerated type cleanups

To please icc

Closes #9179

3 years agotool_paramhlp: fix "enumerated type mixed with another type"
Daniel Stenberg [Wed, 20 Jul 2022 22:26:29 +0000 (00:26 +0200)] 
tool_paramhlp: fix "enumerated type mixed with another type"

Warning by icc

Closes #9179

3 years agotool_writeout: fix enumerated type mixed with another type
Daniel Stenberg [Wed, 20 Jul 2022 22:05:25 +0000 (00:05 +0200)] 
tool_writeout: fix enumerated type mixed with another type

Closes #9179

3 years agotool_cfgable: make 'synthetic_error' a plain bool
Daniel Stenberg [Wed, 20 Jul 2022 21:53:34 +0000 (23:53 +0200)] 
tool_cfgable: make 'synthetic_error' a plain bool

The specific reason was not used.

Closes #9179

3 years agotool_paramhlp: make check_protocol return ParameterError
Daniel Stenberg [Wed, 20 Jul 2022 21:41:41 +0000 (23:41 +0200)] 
tool_paramhlp: make check_protocol return ParameterError

"enumerated type mixed with another type"

Closes #9179

3 years agotool_formparse: fix variable may be used before its value is set
Daniel Stenberg [Wed, 20 Jul 2022 21:33:59 +0000 (23:33 +0200)] 
tool_formparse: fix variable may be used before its value is set

Warning by icc

Closes #9179

3 years agosendf: skip storing HTTP headers if HTTP disabled
Daniel Stenberg [Wed, 20 Jul 2022 21:29:09 +0000 (23:29 +0200)] 
sendf: skip storing HTTP headers if HTTP disabled

Closes #9179

3 years agourl: enumerated type mixed with another type
Daniel Stenberg [Wed, 20 Jul 2022 21:24:17 +0000 (23:24 +0200)] 
url: enumerated type mixed with another type

Follow-up to 1c58e7ae99ce2030213f28b

Closes #9179

3 years agourldata: change second proxytype field to unsigned char to match
Daniel Stenberg [Wed, 20 Jul 2022 21:13:35 +0000 (23:13 +0200)] 
urldata: change second proxytype field to unsigned char to match

To avoid "enumerated type mixed with another type"

Closes #9179

3 years agohttp: typecast the httpreq assignment to avoid icc compiler warning
Daniel Stenberg [Wed, 20 Jul 2022 20:40:30 +0000 (22:40 +0200)] 
http: typecast the httpreq assignment to avoid icc compiler warning

 error #188: enumerated type mixed with another type

Closes #9179

3 years agourldata: make state.httpreq an unsigned char
Daniel Stenberg [Wed, 20 Jul 2022 11:57:34 +0000 (13:57 +0200)] 
urldata: make state.httpreq an unsigned char

To match set.method used for the same purpose.

Closes #9179

3 years agosplay: avoid using -1 in unsigned variable
Daniel Stenberg [Wed, 20 Jul 2022 11:44:37 +0000 (13:44 +0200)] 
splay: avoid using -1 in unsigned variable

To fix icc compiler warning integer conversion resulted in a change of sign

Closes #9179

3 years agosendf: store the header type in an usigned char to avoid icc warnings
Daniel Stenberg [Wed, 20 Jul 2022 10:48:49 +0000 (12:48 +0200)] 
sendf: store the header type in an usigned char to avoid icc warnings

Closes #9179

3 years agomulti: fix the return code from Curl_pgrsDone()
Daniel Stenberg [Wed, 20 Jul 2022 10:13:02 +0000 (12:13 +0200)] 
multi: fix the return code from Curl_pgrsDone()

It does not return a CURLcode. Detected by the icc compiler warning
"enumerated type mixed with another type"

Closes #9179