]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
3 years agoFAQ: add GOPHERS + curl works on data, not files
Daniel Stenberg [Wed, 15 Sep 2021 12:33:05 +0000 (14:33 +0200)] 
FAQ: add GOPHERS + curl works on data, not files

3 years agoRELEASE-NOTES: synced curl-7_79_0
Daniel Stenberg [Tue, 14 Sep 2021 06:59:56 +0000 (08:59 +0200)] 
RELEASE-NOTES: synced

For the 7.79.0 release

3 years agoTHANKS: add contributors from 7.79.0 release cycle
Daniel Stenberg [Tue, 14 Sep 2021 07:02:30 +0000 (09:02 +0200)] 
THANKS: add contributors from 7.79.0 release cycle

3 years agoFAQ: add two dev related questions
Daniel Stenberg [Mon, 13 Sep 2021 15:21:38 +0000 (17:21 +0200)] 
FAQ: add two dev related questions

  8.1 Why does curl use C89?
  8.2 Will curl be rewritten?

Spell-checked-by: Paul Johnson
Closes #7715

3 years agozuul.d/jobs: disable three tests for *-openssl-disable-proxy
Daniel Stenberg [Mon, 13 Sep 2021 10:33:27 +0000 (12:33 +0200)] 
zuul.d/jobs: disable three tests for *-openssl-disable-proxy

... as they mysteriously seem to permfail without being related to
proxy.

Closes #7714

3 years agoftp,imap,pop3,smtp: reject STARTTLS server response pipelining
Patrick Monnerat [Tue, 7 Sep 2021 11:26:42 +0000 (13:26 +0200)] 
ftp,imap,pop3,smtp: reject STARTTLS server response pipelining

If a server pipelines future responses within the STARTTLS response, the
former are preserved in the pingpong cache across TLS negotiation and
used as responses to the encrypted commands.

This fix detects pipelined STARTTLS responses and rejects them with an
error.

CVE-2021-22947

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

3 years agoftp,imap,pop3: do not ignore --ssl-reqd
Patrick Monnerat [Wed, 8 Sep 2021 09:56:22 +0000 (11:56 +0200)] 
ftp,imap,pop3: do not ignore --ssl-reqd

In imap and pop3, check if TLS is required even when capabilities
request has failed.

In ftp, ignore preauthentication (230 status of server greeting) if TLS
is required.

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

CVE-2021-22946

3 years agomqtt: clear the leftovers pointer when sending succeeds
z2_ on hackerone [Tue, 24 Aug 2021 07:50:33 +0000 (09:50 +0200)] 
mqtt: clear the leftovers pointer when sending succeeds

CVE-2021-22945

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

3 years agozuul: bump the rustls job to use v0.7.2
Daniel Stenberg [Fri, 10 Sep 2021 22:12:13 +0000 (00:12 +0200)] 
zuul: bump the rustls job to use v0.7.2

... and add -lm when using a rust library.

Closes #7701

3 years agoRELEASE-PROCEDURE: add release dates from now to 8.0.0 in 2023
Daniel Stenberg [Mon, 13 Sep 2021 14:32:41 +0000 (16:32 +0200)] 
RELEASE-PROCEDURE: add release dates from now to 8.0.0 in 2023

3 years agoSECURITY-PROCESS: tweak a little to match current practices
Daniel Stenberg [Mon, 13 Sep 2021 08:23:50 +0000 (10:23 +0200)] 
SECURITY-PROCESS: tweak a little to match current practices

Closes #7713

3 years agohttp_proxy: fix the User-Agent inclusion in CONNECT
Daniel Stenberg [Sat, 11 Sep 2021 22:20:22 +0000 (00:20 +0200)] 
http_proxy: fix the User-Agent inclusion in CONNECT

It should not refer to the uagent string that is allocated and created
for the end server http request, as that pointer may be cleared on
subsequent CONNECT requests.

Added test case 1184 to verify.

Reported-by: T200proX7 on github
Fixes #7705
Closes #7707

3 years agoCurl_hsts_loadcb: don't attempt to load if hsts wasn't inited
Daniel Stenberg [Sun, 12 Sep 2021 21:22:47 +0000 (23:22 +0200)] 
Curl_hsts_loadcb: don't attempt to load if hsts wasn't inited

Reported-by: Jonathan Cardoso
Fixes #7710
Closes #7711

3 years agongtcp2: fix build with ngtcp2 and nghttp3
Tatsuhiro Tsujikawa [Sun, 12 Sep 2021 06:27:33 +0000 (15:27 +0900)] 
ngtcp2: fix build with ngtcp2 and nghttp3

ngtcp2_conn_client_new and nghttp3_conn_client_new are now macros.
Check the wrapped functions instead.

ngtcp2_stream_close callback now takes flags parameter.

Closes #7709

3 years agowrite-out.d: clarify size_download/upload
Daniel Stenberg [Sat, 11 Sep 2021 20:59:38 +0000 (22:59 +0200)] 
write-out.d: clarify size_download/upload

They show the number of "body" bytes transfered.
Fixes #7702
Closes #7706

3 years agohttp2: Curl_http2_setup needs to init stream data in all invokes
Daniel Stenberg [Fri, 10 Sep 2021 09:39:22 +0000 (11:39 +0200)] 
http2: Curl_http2_setup needs to init stream data in all invokes

Thus function was written to avoid doing multiple connection data
initializations, which is fine, but since it also initiates stream
related data it is crucial that it doesn't skip those even if called
again for the same connection. Solved by moving the stream
initializations before the "doing-it-again" check.

Reported-by: Inho Oh
Fixes #7630
Closes #7692

3 years agourl: fix compiler warning in no-verbose builds
Daniel Stenberg [Fri, 10 Sep 2021 15:09:05 +0000 (17:09 +0200)] 
url: fix compiler warning in no-verbose builds

Follow-up from 2f0bb864c12

Closes #7700

3 years agonon-ascii: fix build errors from strerror fix
Daniel Stenberg [Fri, 10 Sep 2021 13:16:21 +0000 (15:16 +0200)] 
non-ascii: fix build errors from strerror fix

Follow-up to 2f0bb864c12

Closes #7697

3 years agoparse_args: redo the warnings for --remote-header-name combos
Daniel Stenberg [Fri, 10 Sep 2021 13:28:20 +0000 (15:28 +0200)] 
parse_args: redo the warnings for --remote-header-name combos

... to avoid the memory leak risk pointed out by scan-build.

Follow-up from 7a3e981781d6c18a

Closes #7698

3 years agongtcp2: adapt to new size defintions upstream
Daniel Stenberg [Fri, 10 Sep 2021 13:40:51 +0000 (15:40 +0200)] 
ngtcp2: adapt to new size defintions upstream

Reviewed-by: Tatsuhiro Tsujikawa
Closes #7699

3 years agorustls: add strerror.h include
Daniel Stenberg [Fri, 10 Sep 2021 13:20:20 +0000 (15:20 +0200)] 
rustls: add strerror.h include

Follow-up to 2f0bb864c12

3 years agodocs: the security list is reached at security at curl.se now
Daniel Stenberg [Thu, 9 Sep 2021 12:46:38 +0000 (14:46 +0200)] 
docs: the security list is reached at security at curl.se now

Also update the FAQ section a bit to encourage users to rather submit
security issues on hackerone than sending email.

Closes #7689

3 years agoruntests: add option -u to error on server unexpectedly alive
Marc Hoersken [Wed, 2 Jun 2021 18:57:44 +0000 (20:57 +0200)] 
runtests: add option -u to error on server unexpectedly alive

Let's try to actually handle the server unexpectedly alive
case by first making them visible on CI builds as failures.

This is needed to detect issues with killing of the test
servers completely including nested process chains with
multiple PIDs per test server (including bash and perl).

On Windows/cygwin platforms this is especially helpful with
debugging PID mixups due to cygwin using its own PID space.

Reviewed-by: Daniel Stenberg
Closes #7180

3 years agoopts docs: unify phrasing in NAME header
Daniel Stenberg [Wed, 8 Sep 2021 20:55:58 +0000 (22:55 +0200)] 
opts docs: unify phrasing in NAME header

- avoid writing "set ..." or "enable/disable ..." or "specify ..."
  *All* options for curl_easy_setopt() are about setting or enabling
  things and most of the existing options didn't use that way of
  description.

- start with lowercase letter, unless abbreviation. For consistency.

- Some additional touch-ups

Closes #7688

3 years agostrerror.h: remove the #include from files not using it
Daniel Stenberg [Wed, 8 Sep 2021 12:42:35 +0000 (14:42 +0200)] 
strerror.h: remove the #include from files not using it

3 years agolib: don't use strerror()
Daniel Stenberg [Wed, 8 Sep 2021 09:27:49 +0000 (11:27 +0200)] 
lib: don't use strerror()

We have and provide Curl_strerror() internally for a reason: strerror()
is not necessarily thread-safe so we should always try to avoid it.

Extended checksrc to warn for this, but feature the check disabled by
default and only enable it in lib/

Closes #7685

3 years agocirrus: Add FreeBSD 13.0 job and disable sanitizer build
Daniel Gustafsson [Wed, 8 Sep 2021 08:14:45 +0000 (10:14 +0200)] 
cirrus: Add FreeBSD 13.0 job and disable sanitizer build

As alluded to the in the now removed comment, a 13.0 image became
available and is now ready to be used.

The sanitizer builds were running on the 12.1 image which since has
been removed from the config, leaving the builds not running at all.
When enabled it turns out that they don't actually work due to very
long timeouts in executing the tests, so keep the disabled for now
but a bit more controlled.

Closes #7592

3 years agocopyrights: update copyright year ranges
Daniel Stenberg [Wed, 8 Sep 2021 07:36:49 +0000 (09:36 +0200)] 
copyrights: update copyright year ranges

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 8 Sep 2021 06:54:29 +0000 (08:54 +0200)] 
RELEASE-NOTES: synced

3 years agoINTERNALS: c-ares has a new home: c-ares.org
Daniel Stenberg [Tue, 7 Sep 2021 12:56:09 +0000 (14:56 +0200)] 
INTERNALS: c-ares has a new home: c-ares.org

3 years agodocs: remove experimental mentions from HSTS and MQTT
Daniel Stenberg [Mon, 6 Sep 2021 21:04:13 +0000 (23:04 +0200)] 
docs: remove experimental mentions from HSTS and MQTT

Reported-by: Jonathan Cardoso
Bug: https://github.com/curl/curl/pull/6700#issuecomment-913792863
Closes #7681

3 years agocurl: add warning for incompatible parameters usage
Cao ZhenXiang [Sun, 5 Sep 2021 05:04:38 +0000 (13:04 +0800)] 
curl: add warning for incompatible parameters usage

--continue-at - and --remote-header-name are known incompatible parameters

Closes #7674

3 years agoexamples/*hiperfifo.c: fix calloc arguments to match function proto
git-bruh [Mon, 6 Sep 2021 13:51:30 +0000 (19:21 +0530)] 
examples/*hiperfifo.c: fix calloc arguments to match function proto

Closes #7678

3 years agoINTERNALS: bump c-ares requirement to 1.16.0
Daniel Stenberg [Mon, 6 Sep 2021 14:00:52 +0000 (16:00 +0200)] 
INTERNALS: bump c-ares requirement to 1.16.0

Since ba904db0705c93 we use ares_getaddrinfo, added in c-ares 1.16.0

3 years agocurl: stop retry if Retry-After: is longer than allowed
Daniel Stenberg [Mon, 6 Sep 2021 07:08:01 +0000 (09:08 +0200)] 
curl: stop retry if Retry-After: is longer than allowed

If Retry-After: specifies a period that is longer than what fits within
--retry-max-time, then stop retrying immediately.

Added test 366 to verify.

Reported-by: Kari Pahula
Fixes #7675
Closes #7676

3 years agombedtls: avoid using a large buffer on the stack
MAntoniak [Tue, 17 Aug 2021 16:40:25 +0000 (18:40 +0200)] 
mbedtls: avoid using a large buffer on the stack

Use dynamic memory allocation for the buffer used in checking "pinned
public key". The PUB_DER_MAX_BYTES parameter with default settings is
set to a value greater than 2kB.

Co-authored-by: Daniel Stenberg
Closes #7586

3 years agoconfigure: make --disable-hsts work
Daniel Stenberg [Sat, 4 Sep 2021 21:41:07 +0000 (23:41 +0200)] 
configure: make --disable-hsts work

The AC_ARG_ENABLE() macro itself uses a variable called
'enable_[option]', so when our script also used a variable with that
name for the purpose of storing what the user wants, it also
accidentally made it impossible to switch off the feature with
--disable-hsts. Fix this by renaming our variable.

Reported-by: MichaƂ Antoniak
Fixes #7669
Closes #7672

3 years agoconfig.d: note that curlrc is used even when --config
Jay Satiro [Fri, 3 Sep 2021 06:19:33 +0000 (02:19 -0400)] 
config.d: note that curlrc is used even when --config

Bug: https://github.com/curl/curl/pull/7666#issuecomment-912214751
Reported-by: Viktor Szakats
Closes https://github.com/curl/curl/pull/7667

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sat, 4 Sep 2021 09:42:05 +0000 (11:42 +0200)] 
RELEASE-NOTES: synced

3 years agotest1173: check references to libcurl options
Daniel Stenberg [Wed, 1 Sep 2021 10:57:06 +0000 (12:57 +0200)] 
test1173: check references to libcurl options

... that they refer to actual existing libcurl options.

Reviewed-by: Daniel Gustafsson
Closes #7656

3 years agoCURLOPT_UNIX_SOCKET_PATH.3: remove nginx reference, add see also
Daniel Stenberg [Thu, 2 Sep 2021 07:21:27 +0000 (09:21 +0200)] 
CURLOPT_UNIX_SOCKET_PATH.3: remove nginx reference, add see also

Closes #7656

3 years agoopt-docs: verify man page sections + order
Daniel Stenberg [Wed, 1 Sep 2021 08:26:36 +0000 (10:26 +0200)] 
opt-docs: verify man page sections + order

In every libcurl option man page there are now 8 mandatory sections that
must use the right name in the correct order and test 1173 verifies
this. Only 14 man pages needed adjustments.

The sections and the order is as follows:

 - NAME
 - SYNOPSIS
 - DESCRIPTION
 - PROTOCOLS
 - EXAMPLE
 - AVAILABILITY
 - RETURN VALUE
 - SEE ALSO

Reviewed-by: Daniel Gustafsson
Closes #7656

3 years agoopt-docs: make sure all man pages have examples
Daniel Stenberg [Wed, 1 Sep 2021 07:23:37 +0000 (09:23 +0200)] 
opt-docs: make sure all man pages have examples

Extended manpage-syntax.pl (run by test 1173) to check that every man
page for a libcurl option has an EXAMPLE section that is more than two
lines. Then fixed all errors it found and added examples.

Reviewed-by: Daniel Gustafsson
Closes #7656

3 years agoget.d: provide more useful examples
Daniel Stenberg [Fri, 3 Sep 2021 08:14:06 +0000 (10:14 +0200)] 
get.d: provide more useful examples

Closes #7668

3 years agopage-header: add GOPHERS, simplify wording in the 1st para
Daniel Stenberg [Thu, 2 Sep 2021 21:19:48 +0000 (23:19 +0200)] 
page-header: add GOPHERS, simplify wording in the 1st para

Closes #7665

3 years agoconnect: get local port + ip also when reusing connections
Daniel Stenberg [Thu, 2 Sep 2021 13:57:25 +0000 (15:57 +0200)] 
connect: get local port + ip also when reusing connections

Regression. In d6a37c23a3c (7.75.0) we removed the duplicated storage
(connection + easy handle), so this info needs be extracted again even
for re-used connections.

Add test 435 to verify

Reported-by: Max Dymond
Fixes #7660
Closes #7662

3 years agomulti: fix compiler warning with `CURL_DISABLE_WAKEUP` 7661/head
Marcel Raad [Thu, 2 Sep 2021 13:47:42 +0000 (15:47 +0200)] 
multi: fix compiler warning with `CURL_DISABLE_WAKEUP`

`use_wakeup` is unused in this case.

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

3 years agotests: adjust the tftpd output to work with hyper mode
Daniel Stenberg [Wed, 1 Sep 2021 13:51:06 +0000 (15:51 +0200)] 
tests: adjust the tftpd output to work with hyper mode

By making them look less like http headers, the hyper mode "tweak"
doesn't interfere.

Enable test 2002 and 2003 in hyper builds (and 1280 which is unrelated
but should be enabled).

Closes #7658

3 years agoopenssl: annotate SSL3_MT_SUPPLEMENTAL_DATA
Gisle Vanem [Tue, 31 Aug 2021 12:08:34 +0000 (14:08 +0200)] 
openssl: annotate SSL3_MT_SUPPLEMENTAL_DATA

This adds support for the previously unhandled supplemental data which
in -v output was printed like:

    TLSv1.2 (IN), TLS header, Unknown (23):

These will now be printed with proper annotation:

    TLSv1.2 (OUT), TLS header, Supplemental data (23):

Closes #7652
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
3 years agocurl.1: provide examples for each option
Daniel Stenberg [Tue, 31 Aug 2021 14:37:14 +0000 (16:37 +0200)] 
curl.1: provide examples for each option

The file format for each option now features a "Example:" header that
can provide one or more examples that get rendered appropriately in the
output. All options MUST have at least one example or gen.pl complains
at build-time.

This fix also does a few other minor format and consistency cleanups.

Closes #7654

3 years agoprogress: make trspeed avoid floats
Daniel Stenberg [Tue, 31 Aug 2021 12:09:28 +0000 (14:09 +0200)] 
progress: make trspeed avoid floats

and compiler warnings for data conversions.

Reported-by: MichaƂ Antoniak
Fixes #7645
Closes #7653

3 years agotest365: verify response with chunked AND Content-Length headers
Daniel Stenberg [Mon, 30 Aug 2021 20:45:15 +0000 (22:45 +0200)] 
test365: verify response with chunked AND Content-Length headers

3 years agohttp: ignore content-length if any transfer-encoding is used
Daniel Stenberg [Mon, 30 Aug 2021 15:49:25 +0000 (17:49 +0200)] 
http: ignore content-length if any transfer-encoding is used

Fixes #7643
Closes #7649

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 31 Aug 2021 06:55:45 +0000 (08:55 +0200)] 
RELEASE-NOTES: synced

3 years agoRevert "http2: skip immediate parsing of payload following protocol switch"
Daniel Stenberg [Mon, 30 Aug 2021 10:54:24 +0000 (12:54 +0200)] 
Revert "http2: skip immediate parsing of payload following protocol switch"

This reverts commit 455a63c66f188598275e87d32de2c4e8e26b80cb.

Reported-by: Tk Xiong
Fixes #7633
Closes #7648

3 years agoKNOWN_BUGS: HTTP/3 doesn't support client certs
Daniel Stenberg [Mon, 30 Aug 2021 11:23:24 +0000 (13:23 +0200)] 
KNOWN_BUGS: HTTP/3 doesn't support client certs

Closes #7625

3 years agomailing lists: move from cool.haxx.se to lists.haxx.se
Daniel Stenberg [Mon, 30 Aug 2021 07:51:07 +0000 (09:51 +0200)] 
mailing lists: move from cool.haxx.se to lists.haxx.se

3 years agohttp_proxy: only wait for writable socket while sending request
Daniel Stenberg [Fri, 27 Aug 2021 15:42:40 +0000 (17:42 +0200)] 
http_proxy: only wait for writable socket while sending request

Otherwise it would wait socket writability even after the entire CONNECT
request has sent and make curl basically busy-loop while waiting for a
response to come back.

The previous fix attempt in #7484 (c27a70a591a4) was inadequate.

Reported-by: zloi-user on github
Reported-by: Oleguer Llopart
Fixes #7589
Closes #7647

3 years agohttp: disallow >3-digit response codes
Daniel Stenberg [Thu, 26 Aug 2021 14:04:50 +0000 (16:04 +0200)] 
http: disallow >3-digit response codes

Make the built-in HTTP parser behave similar to hyper and reject any
HTTP response using more than 3 digits for the response code.

Updated test 1432 accordingly.
Enabled test 1432 in the hyper builds.

Closes #7641

3 years agongtcp2: stop buffering crypto data
Tatsuhiro Tsujikawa [Thu, 26 Aug 2021 12:20:52 +0000 (21:20 +0900)] 
ngtcp2: stop buffering crypto data

Stop buffering crypto data because libngtcp2 now buffers submitted
crypto data.

Closes #7637

3 years agotest1280: CRLFify the response to please hyper
Daniel Stenberg [Thu, 26 Aug 2021 12:49:41 +0000 (14:49 +0200)] 
test1280: CRLFify the response to please hyper

Closes #7639

3 years agotests: enable test 1129 for hyper builds
Daniel Stenberg [Thu, 26 Aug 2021 12:46:23 +0000 (14:46 +0200)] 
tests: enable test 1129 for hyper builds

Closes #7638

3 years agocurl: better error message when -O fails to get a good name
Daniel Stenberg [Thu, 26 Aug 2021 05:43:34 +0000 (07:43 +0200)] 
curl: better error message when -O fails to get a good name

Due to how this currently works internally, it needs a working initial
file name to store contents in, so it may still fail even with -J is
used (and thus accepting a name from content-disposition:) if the file
name part of the URL isn't "good enough".

Fixes #7628
Closes #7635

3 years agocurl_easy_setopt: tweak the string copy wording
Daniel Stenberg [Thu, 26 Aug 2021 05:51:19 +0000 (07:51 +0200)] 
curl_easy_setopt: tweak the string copy wording

Reported-by: Yaobin Wen
Fixes #7632
Closes #7634

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 25 Aug 2021 11:10:52 +0000 (13:10 +0200)] 
RELEASE-NOTES: synced

3 years agocmake: sync CURL_DISABLE options
Don [Tue, 24 Aug 2021 18:27:39 +0000 (11:27 -0700)] 
cmake: sync CURL_DISABLE options

Adds the full listing of CURL_DISABLE options to the CMake build. Moves
all option code, except for CURL_DISABLE_OPENSSL_AUTO_LOA_CONFIG which
resides near OpenSSL configuration, to the same block of code. Also
sorts the options here and in the cmake config header.

Additionally sorted the CURL-DISABLE listing and fixed the
CURL_DISABLE_POP3 option.

Closes #7624

3 years agoKNOWN_BUGS: FTPS upload data loss with TLS 1.3
Jay Satiro [Tue, 24 Aug 2021 16:54:03 +0000 (12:54 -0400)] 
KNOWN_BUGS: FTPS upload data loss with TLS 1.3

Bug: https://github.com/curl/curl/issues/6149
Reported-by: Bylon2@users.noreply.github.com
Closes https://github.com/curl/curl/pull/7623

3 years agocmake: avoid poll() on macOS
Daniel Stenberg [Mon, 23 Aug 2021 14:39:33 +0000 (16:39 +0200)] 
cmake: avoid poll() on macOS

... like we do in configure builds. Since poll() on macOS is not
reliable enough.

Reported-by: marc-groundctl
Fixes #7595
Closes #7619

3 years agoc-hyper: handle HTTP/1.1 => HTTP/1.0 downgrade on reused connection
Daniel Stenberg [Mon, 23 Aug 2021 12:20:08 +0000 (14:20 +0200)] 
c-hyper: handle HTTP/1.1 => HTTP/1.0 downgrade on reused connection

Enable test 1074

Closes #7617

3 years agoc-hyper: deal with Expect: 100-continue combined with POSTFIELDS
Daniel Stenberg [Mon, 23 Aug 2021 11:04:59 +0000 (13:04 +0200)] 
c-hyper: deal with Expect: 100-continue combined with POSTFIELDS

Enable test 1130 and 1131

Closes #7616

3 years agotests: be explicit about using 'python3' instead of 'python'
a1346054 [Sat, 21 Aug 2021 12:07:34 +0000 (12:07 +0000)] 
tests: be explicit about using 'python3' instead of 'python'

This fixes running tests in virtualenvs (or on distros) that no longer
have a symlink from python to python2 or python3.

Closes #7602

3 years agoscripts: invoke interpreters through /usr/bin/env
a1346054 [Sat, 21 Aug 2021 10:57:11 +0000 (10:57 +0000)] 
scripts: invoke interpreters through /usr/bin/env

Closes #7602

3 years agoDISABLED: enable 11 more tests for hyper builds
Daniel Stenberg [Mon, 23 Aug 2021 07:27:43 +0000 (09:27 +0200)] 
DISABLED: enable 11 more tests for hyper builds

Closes #7612

3 years agosetopt: enable CURLOPT_IGNORE_CONTENT_LENGTH for hyper
Daniel Stenberg [Mon, 23 Aug 2021 07:58:54 +0000 (09:58 +0200)] 
setopt: enable CURLOPT_IGNORE_CONTENT_LENGTH for hyper

Since this option is also used for FTP, it needs to work to set for
applications even if hyper doesn't support it for HTTP. Verified by test
1137.

Updated docs to specify that the option doesn't work for HTTP when using
the hyper backend.

Closes #7614

3 years agotest1138: remove trailing space to make work with hyper
Daniel Stenberg [Mon, 23 Aug 2021 07:50:46 +0000 (09:50 +0200)] 
test1138: remove trailing space to make work with hyper

Closes #7613

3 years agolibcurl-errors.3: clarify two CURLUcode errors
Daniel Stenberg [Mon, 23 Aug 2021 06:38:32 +0000 (08:38 +0200)] 
libcurl-errors.3: clarify two CURLUcode errors

CURLUE_BAD_HANDLE and CURLUE_BAD_PARTPOINTER should be for "bad" or
wrong pointers in a generic sense, not just for NULL pointers.

Reviewed-by: Jay Satiro
Ref: #7605
Closes #7611

3 years agosymbols-in-versions: fix CURLSSLBACKEND_QSOSSL last used version
Jay Satiro [Sun, 22 Aug 2021 05:24:46 +0000 (01:24 -0400)] 
symbols-in-versions: fix CURLSSLBACKEND_QSOSSL last used version

... and also change the 'Removed' column name to 'Last' since that
column is for the last version to contain the symbol.

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

3 years agourlapi.c:seturl: assert URL instead of using if-check
Daniel Stenberg [Sun, 22 Aug 2021 22:34:16 +0000 (00:34 +0200)] 
urlapi.c:seturl: assert URL instead of using if-check

There's no code flow possible where this can happen. The assert makes
sure it also won't be introduced undetected in the future.

Closes #7610

3 years agocurl-openssl.m4: show correct output for OpenSSL v3
Daniel Stenberg [Sat, 21 Aug 2021 21:27:50 +0000 (23:27 +0200)] 
curl-openssl.m4: show correct output for OpenSSL v3

Using 3.0.0 versions configure should now show this:

checking for OpenSSL headers version... 3.0.0 - 0x300
checking for OpenSSL library version... 3.0.0
checking for OpenSSL headers and library versions matching... yes

This output doesn't actually change what configure generates but is only
"cosmetic".

Reported-by: Randall S. Becker
Fixes #7606
Closes #7608

3 years agomksymbolsmanpage.pl: Fix showing symbol's last used version
Jay Satiro [Sun, 22 Aug 2021 05:12:26 +0000 (01:12 -0400)] 
mksymbolsmanpage.pl: Fix showing symbol's last used version

Prior to this change the symbol's deprecated version was erroneously
shown as its last used version.

Bug: https://github.com/curl/curl/commit/4e53b94#commitcomment-55239509
Reported-by: i-ky@users.noreply.github.com
3 years agomksymbolsmanpage.pl: match symbols case insenitively
Daniel Stenberg [Sat, 21 Aug 2021 20:56:48 +0000 (22:56 +0200)] 
mksymbolsmanpage.pl: match symbols case insenitively

Follow-up to 4e53b9430c750 which made this bug show.

Reported-by: i-ky
Bug: https://github.com/curl/curl/commit/4e53b9430c7504de8984796e2a2091ec16f27136#commitcomment-55239253
Closes #7607

3 years agoasyn-ares: call ares_freeaddrinfo() to clean up addrinfo results
Daniel Stenberg [Fri, 20 Aug 2021 12:39:14 +0000 (14:39 +0200)] 
asyn-ares: call ares_freeaddrinfo() to clean up addrinfo results

As this leaks memory otherwise

Follow-up to ba904db0705c931

Closes #7599

3 years agowolfssl: clean up wolfcrypt error queue
Ehren Bendler [Thu, 19 Aug 2021 17:45:55 +0000 (13:45 -0400)] 
wolfssl: clean up wolfcrypt error queue

If wolfSSL is built in certain ways (OPENSSL_EXTRA or Debug), the error
queue gets added on to for each session and never freed. Fix it by
calling ERR_clear_error() like in vtls/openssl when needed. This func is
a no-op in wolfcrypt if the error queue is not enabled.

Closes #7594

3 years agoman pages: remove trailing whitespaces
Daniel Stenberg [Sat, 21 Aug 2021 13:31:31 +0000 (15:31 +0200)] 
man pages: remove trailing whitespaces

Extended test 1173 (via the manpage-syntax.pl script) to detect and warn
for them.

Ref: #7602
Reported-by: a1346054 on github
Closes #7604

3 years agomailmap: add Gleb Ivanovsky
Daniel Stenberg [Sat, 21 Aug 2021 14:38:06 +0000 (16:38 +0200)] 
mailmap: add Gleb Ivanovsky

3 years agoconfig.d: escape the backslash properly
Daniel Stenberg [Sat, 21 Aug 2021 13:02:04 +0000 (15:02 +0200)] 
config.d: escape the backslash properly

Closes #7603

3 years agocurl_setup.h: sync values for HTTP_ONLY
Don [Fri, 20 Aug 2021 16:29:10 +0000 (09:29 -0700)] 
curl_setup.h: sync values for HTTP_ONLY

The values for HTTP_ONLY differed between CMakeLists.txt and
curl_setup.h. Sync them and sort the values in curl_setup.h to make it
easier to spot differences.

Closes #7601

3 years agoconfigure: set classic mingw minimum OS version to XP
Jay Satiro [Tue, 17 Aug 2021 06:24:48 +0000 (02:24 -0400)] 
configure: set classic mingw minimum OS version to XP

- If the user has not specified a minimum OS version (via WINVER or
  _WIN32_WINNT macros) then set it to Windows XP.

Prior to this change classic MinGW defaulted the minimum OS version
to Windows NT 4.0 which is way too old. At least Windows XP is needed
for getaddrinfo (which resolves hostnames to IPv6 addresses).

Ref: https://github.com/curl/curl/issues/7483#issuecomment-891597034

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

3 years agoschannel: Work around typo in classic mingw macro
Jay Satiro [Tue, 17 Aug 2021 06:17:21 +0000 (02:17 -0400)] 
schannel: Work around typo in classic mingw macro

- Define ALG_CLASS_DHASH (the typo from the include) to ALG_CLASS_HASH.

Prior to this change there was an incomplete fix to ignore the
CALG_TLS1PRF macro on those versions of MinGW where it uses the
ALG_CLASS_DHASH typoed macro.

Ref: 48cf45c
Ref: https://osdn.net/projects/mingw/ticket/38391
Ref: https://github.com/curl/curl/issues/2924

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

3 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 20 Aug 2021 11:57:20 +0000 (13:57 +0200)] 
RELEASE-NOTES: synced

3 years agohttp_proxy: fix user-agent and custom headers for CONNECT with hyper
Daniel Stenberg [Fri, 20 Aug 2021 11:34:51 +0000 (13:34 +0200)] 
http_proxy: fix user-agent and custom headers for CONNECT with hyper

Enable test 287

Closes #7598

3 years agoc-hyper: initial support for "dumping" 1xx HTTP responses
Daniel Stenberg [Sat, 14 Aug 2021 16:04:22 +0000 (18:04 +0200)] 
c-hyper: initial support for "dumping" 1xx HTTP responses

With the use hyper_request_on_informational()

Enable test 155 and 158

Closes #7597

3 years agotests/*server.pl: flush output before executing subprocess
Marc Hoersken [Tue, 17 Aug 2021 19:16:41 +0000 (21:16 +0200)] 
tests/*server.pl: flush output before executing subprocess

Also avoid shell processes staying around by using exec.
This is necessary to avoid output data being buffering
inside the process chain of Perl, Bash/Shell and our
test server binaries. On non-Windows systems the exec
will also make the subprocess replace the intermediate
shell, but on Windows it will at least bind the processes
together since there is no real fork or exec available.

See: https://cygwin.com/cygwin-ug-net/highlights.html
and: https://docs.microsoft.com/cpp/c-runtime-library/exec-wexec-functions
Ref: https://github.com/curl/curl/pull/7530#issuecomment-900949010

Reviewed-by: Daniel Stenberg
Reviewed-by: Jay Satiro
Closes #7530

3 years agoCI: use GitHub Container Registry instead of Docker Hub
Marc Hoersken [Tue, 17 Aug 2021 19:39:17 +0000 (21:39 +0200)] 
CI: use GitHub Container Registry instead of Docker Hub

Avoid limits on Docker Hub and improve image pull/download speed.

Closes #7587

3 years agoopenssl: when creating a new context, there cannot be an old one
Daniel Stenberg [Tue, 17 Aug 2021 14:52:55 +0000 (16:52 +0200)] 
openssl: when creating a new context, there cannot be an old one

Remove the previous handling that would call SSL_CTX_free(), and instead
add an assert that halts a debug build if there ever is a context
already set at this point.

Closes #7585

3 years agoKNOWN_BUGS: Renegotiate from server may cause hang for OpenSSL backend
Jay Satiro [Wed, 18 Aug 2021 07:41:41 +0000 (03:41 -0400)] 
KNOWN_BUGS: Renegotiate from server may cause hang for OpenSSL backend

Closes https://github.com/curl/curl/issues/6785

3 years agodocs/BINDINGS: URL update
Viktor Szakats [Tue, 17 Aug 2021 23:16:46 +0000 (23:16 +0000)] 
docs/BINDINGS: URL update

3 years agotests/server/*.c: align handling of portfile argument and file
Marc Hoersken [Sun, 15 Aug 2021 10:40:54 +0000 (12:40 +0200)] 
tests/server/*.c: align handling of portfile argument and file

1. Call the internal variable portname (like pidname) everywhere.
2. Have a variable wroteportfile (like wrotepidfile) everywhere.
3. Make sure the file is cleaned up on exit (like pidfile).
4. Add parameter --portfile to usage outputs everywhere.

Reviewed-by: Daniel Stenberg
Replaces #7523
Closes #7574

3 years agoKNOWN_BUGS: Fix a number of typos in KNOWN_BUGS
Daniel Gustafsson [Tue, 17 Aug 2021 11:49:04 +0000 (13:49 +0200)] 
KNOWN_BUGS: Fix a number of typos in KNOWN_BUGS

Fixes a set of typos found in section 11.3.

3 years agogetparameter: fix the --local-port number parser
Daniel Stenberg [Tue, 17 Aug 2021 07:50:02 +0000 (09:50 +0200)] 
getparameter: fix the --local-port number parser

It could previously get tricked into parsing the uninitialized stack
based buffer.

Reported-by: Brian Carpenter
Closes #7582