]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
8 months agolib: build fixups when built with most things disabled tiny-curl-8_2
Daniel Stenberg [Thu, 17 Aug 2023 12:18:06 +0000 (14:18 +0200)] 
lib: build fixups when built with most things disabled

Closes #11687

8 months agotiny-curl: patch set
Daniel Stenberg [Thu, 24 Aug 2023 07:24:02 +0000 (09:24 +0200)] 
tiny-curl: patch set

9 months agoRELEASE-NOTES: synced curl-8_2_1
Daniel Stenberg [Wed, 26 Jul 2023 06:10:40 +0000 (08:10 +0200)] 
RELEASE-NOTES: synced

curl 8.2.1 release

9 months agoTHANKS: add contributors from 8.2.1
Daniel Stenberg [Wed, 26 Jul 2023 06:10:40 +0000 (08:10 +0200)] 
THANKS: add contributors from 8.2.1

9 months agodocs: provide more see also for cipher options
Daniel Stenberg [Tue, 25 Jul 2023 08:28:18 +0000 (10:28 +0200)] 
docs: provide more see also for cipher options

More cross references. Hide nroff errors.

Closes #11513

9 months agodocs: mark two TLS options for TLS, not SSL
Daniel Stenberg [Tue, 25 Jul 2023 08:31:42 +0000 (10:31 +0200)] 
docs: mark two TLS options for TLS, not SSL

Closes #11514

9 months agocurl_multi_wait.3: fix arg quoting to doc macro .BR
bch [Mon, 24 Jul 2023 22:31:50 +0000 (15:31 -0700)] 
curl_multi_wait.3: fix arg quoting to doc macro .BR

Closes #11511

9 months agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 24 Jul 2023 21:03:23 +0000 (23:03 +0200)] 
RELEASE-NOTES: synced

9 months agocmake: update ngtcp2 detection
Viktor Szakats [Mon, 24 Jul 2023 12:42:56 +0000 (12:42 +0000)] 
cmake: update ngtcp2 detection

Replace `OpenSSL` with `quictls` to follow the same change
in the v0.17.0 ngtcp2 release.

Follow-up to e0093b4b732f6495b0fb1cd6747cbfedcdcf63ed

Closes #11508

9 months agohttp: VLH, very large header test and fixes
Stefan Eissing [Mon, 24 Jul 2023 13:38:04 +0000 (15:38 +0200)] 
http: VLH, very large header test and fixes

- adding tests using very large passwords in auth
- fixes general http sending to treat h3 like h2, and
  not like http1.1
- eliminate H2_HEADER max definitions and use the commmon
  DYN_HTTP_REQUEST everywhere, different limits do not help
- fix http2 handling of requests denied by nghttp2 on send
  to immediately report the refused stream

Closes #11509

9 months agoCONTRIBUTE: drop mention of copyright year ranges
Andrei Rybak [Sun, 23 Jul 2023 21:33:45 +0000 (23:33 +0200)] 
CONTRIBUTE: drop mention of copyright year ranges

Year ranges in copyrights were dropped in commits [1] and [2].
Verification of year ranges in copyrights was dropped from script
'scripts/copyright.pl' in commit [3].  However, the corresponding
passages in file 'docs/CONTRIBUTE.md' weren't updated.

Drop mentions of copyright year ranges from 'docs/CONTRIBUTE.md'.

[1] 2bc1d775f (copyright: update all copyright lines and remove year
    ranges, 2023-01-02)
[2] c46761bd8 (tests/http: remove year ranges from copyrights,
    2023-03-14)
[3] 0e293bacb (copyright.pl: cease doing year verifications, 2023-01-28)

Closes #11504

9 months agoCONTRIBUTE: fix syntax in commit message description
Andrei Rybak [Sun, 23 Jul 2023 21:32:45 +0000 (23:32 +0200)] 
CONTRIBUTE: fix syntax in commit message description

File 'docs/CONTRIBUTE.md' includes a description of how one should write
commit messages in the curl project.  Different possible parts of the
message are enclosed in square brackets.  One exception is the section
describing how the curl project doesn't use "Signed-off-by" commit
trailers [1], which is enclosed in an opening curly brace paired with a
closing square bracket.

Fix the enclosing square brackets in description of "Signed-off-by"
trailers in commit messages in file 'docs/CONTRIBUTE.md'.

[1] See description of option '--signoff' in Git documentation:
    https://git-scm.com/docs/git-commit

Closes #11504

9 months agosrc/mkhelp: strip off escape sequences
Daniel Stenberg [Sun, 23 Jul 2023 14:27:57 +0000 (16:27 +0200)] 
src/mkhelp: strip off escape sequences

At some point the nroff command stopped stripping off escape sequences,
so then this script needs to do the job instead.

Reported-by: VictorVG on github
Fixes #11501
Closes #11503

9 months agoKNOWN_BUGS: building for old macOS fails with gcc
Daniel Stenberg [Sun, 23 Jul 2023 15:00:29 +0000 (17:00 +0200)] 
KNOWN_BUGS: building for old macOS fails with gcc

Closes #11441

9 months agorustls: update rustls-ffi 0.10.0
Jacob Hoffman-Andrews [Wed, 29 Mar 2023 21:01:55 +0000 (14:01 -0700)] 
rustls: update rustls-ffi 0.10.0

This brings in version 0.21.0 of the upstream rustls implementation,
which notable includes support for IP address certificates.

Closes #10865

9 months agowebsocket: rename arguments/variables to match docs
bch [Thu, 20 Jul 2023 22:03:16 +0000 (15:03 -0700)] 
websocket: rename arguments/variables to match docs

Pedantry/semantic-alignment between functions, docs, comments with
respect to websocket protocol code; No functional change intended.

* "totalsize", "framesize" becomes "fragsize" (we deal in frame fragments).

* "sendflags" becomes "flags"

* use canonical CURL *handle

Closes #11493

9 months agobug_report: use issue forms instead of markdown template
Jan Macku [Wed, 19 Jul 2023 14:31:11 +0000 (16:31 +0200)] 
bug_report: use issue forms instead of markdown template

Issue forms allow you to define web-like input forms using YAML
syntax. It allows you to guide the reporter to get the required
information.

Signed-off-by: Jan Macku <jamacku@redhat.com>
Closes #11474

9 months agoTODO: Obey Retry-After in redirects
Daniel Stenberg [Fri, 21 Jul 2023 11:53:47 +0000 (13:53 +0200)] 
TODO: Obey Retry-After in redirects

(remove "Set custom client ip when using haproxy protocol" which was
shipped in 8.2.0)

Mentioned-by: Yair Lenga
Closes #11447

9 months agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 21 Jul 2023 10:47:47 +0000 (12:47 +0200)] 
RELEASE-NOTES: synced

9 months agoamissl: fix AmiSSL v5 detection
Futaura [Wed, 19 Jul 2023 18:49:09 +0000 (19:49 +0100)] 
amissl: fix AmiSSL v5 detection

Due to changes in the AmiSSL SDK, the detection needed adjusting.

Closes #11477

9 months agounittest/makefile: remove unneeded unit1621_LDADD
Alois Klink [Thu, 20 Jul 2023 00:10:02 +0000 (01:10 +0100)] 
unittest/makefile: remove unneeded unit1621_LDADD

The `unit1621_LDADD` variable has the exact same value as the `LDADD`
flag in `Makefile.am`, except without `@LDFLAGS@ @LIBCURL_LIBS@`.

This was originally added by [98e6629][], but I can't see any reason
why it exists, so we should remove it to clean things up.

[98e6629]: https://github.com/curl/curl/commit/98e6629154044e4ab1ee7cff8351c7ebcb131e88

Closes #11494

9 months agounittest/makefile: remove unneeded unit1394_LDADD
Alois Klink [Wed, 19 Jul 2023 23:42:38 +0000 (00:42 +0100)] 
unittest/makefile: remove unneeded unit1394_LDADD

These custom `unit1394_LDADD` and similar automake overrides are no
longer neded. They were originally added by added by [8dac7be][] for
metalink support, but are no longer after [265b14d][] removed metalink.

[8dac7be]: https://github.com/curl/curl/commit/8dac7be438512a8725d3c71e9139bdfdcac1ed8c
[265b14d]: https://github.com/curl/curl/commit/265b14d6b37c4298bd5556fabcbc37d36f911693

Closes #11494

9 months agocmake: add `libcurlu`/`libcurltool` for unit tests
Alois Klink [Sun, 16 Jul 2023 05:32:45 +0000 (06:32 +0100)] 
cmake: add `libcurlu`/`libcurltool` for unit tests

Add a `libcurlu`/`libcurltool` static library that is compiled only for
unit tests. We use `EXCLUDE_FROM_ALL` to make sure that they're not
built by default, they're only built if unit tests are built.

These libraries allow us to compile every unit test with CMake.

Closes #11446

9 months agotest979: test -u with redirect to (the same) absolute host
Daniel Stenberg [Thu, 20 Jul 2023 21:20:50 +0000 (23:20 +0200)] 
test979: test -u with redirect to (the same) absolute host

Verifies #11492

9 months agotransfer: do not clear the credentials on redirect to absolute URL
Daniel Stenberg [Thu, 20 Jul 2023 21:28:19 +0000 (23:28 +0200)] 
transfer: do not clear the credentials on redirect to absolute URL

Makes test 979 work. Regression shipped in 8.2.0 from commit
dd4d1a26959f63a2c

Fixes #11486
Reported-by: Cloudogu Siebels
Closes #11492

9 months agoos400: correct EXPECTED_STRING_LASTZEROTERMINATED
Jon Rumsey [Wed, 19 Jul 2023 13:49:34 +0000 (14:49 +0100)] 
os400: correct EXPECTED_STRING_LASTZEROTERMINATED

Correct EXPECTED_STRING_LASTZEROTERMINATED to account for
CURLOPT_HAPROXY_CLIENT_IP which requires EBCDIC to ASCII conversion when
passed into curl_easy_setopt().

Closes #11476

9 months agoamissl: add missing signal.h include
Futaura [Wed, 19 Jul 2023 18:54:40 +0000 (19:54 +0100)] 
amissl: add missing signal.h include

In some environments, signal.h is already included, but not in others
which cause compilation to fail, so explictly include it.

Closes #11478

9 months agoamigaos: fix sys/mbuf.h m_len macro clash
Futaura [Wed, 19 Jul 2023 18:58:44 +0000 (19:58 +0100)] 
amigaos: fix sys/mbuf.h m_len macro clash

The updated Curl_http_req_make and Curl_http_req_make2 functions spawned
a parameter called m_len. The AmigaOS networking headers, derived from
NetBSD, contain "#define m_len m_hdr.mh_len" which clashes with
this. Since we do not actually use mbuf, force the include file to be
ignored, removing the clash.

Closes #11479

9 months agosocks: print ipv6 address within brackets
Daniel Stenberg [Thu, 20 Jul 2023 09:14:37 +0000 (11:14 +0200)] 
socks: print ipv6 address within brackets

Fixes #11483
Closes #11484

9 months agolibcurl-errors.3: add CURLUE_OK
MonkeybreadSoftware [Thu, 20 Jul 2023 11:45:14 +0000 (13:45 +0200)] 
libcurl-errors.3: add CURLUE_OK

Closes #11488

9 months agocfilters: rename close/connect functions to avoid clashes
Futaura [Thu, 20 Jul 2023 17:07:49 +0000 (18:07 +0100)] 
cfilters: rename close/connect functions to avoid clashes

Rename `close` and `connect` in `struct Curl_cftype` for
consistency and to avoid clashes with macros of the same name
(the standard AmigaOS networking connect() function is implemented
via a macro).

Closes #11491

9 months agohttp2: fix regression on upload EOF handling
Stefan Eissing [Thu, 20 Jul 2023 11:08:00 +0000 (13:08 +0200)] 
http2: fix regression on upload EOF handling

- a regression introduced by c9ec85121110d7cbbbed2990024222c8f5b8afe5
  where optimization of small POST bodies leads to a new code path
  for such uploads that did not trigger the "done sending" event
- add triggering this event for early "upload_done" situations

Fixes #11485
Closes #11487
Reported-by: Aleksander Mazur
9 months agoconfigure: check for nghttp2_session_get_stream_local_window_size
Daniel Stenberg [Wed, 19 Jul 2023 13:48:05 +0000 (15:48 +0200)] 
configure: check for nghttp2_session_get_stream_local_window_size

The http2 code uses it now. Introduced in nghttp2 1.15.0 (Sep 2016)

Fixes #11470
Reported-by: Paul Howarth
Closes #11473

9 months agoquiche: fix segfault and other things
Stefan Eissing [Wed, 19 Jul 2023 08:42:07 +0000 (10:42 +0200)] 
quiche: fix segfault and other things

- refs #11449 where a segfault is reported when IP Eyeballing did
  not immediately connect but made several attempts
- The transfer initiating the eyeballing was initialized  too early,
  leadding to references to the filter instance that was then
  replaced in the subsequent eyeball attempts. That led to a use
  after free in the buffer handling for the transfer
- transfers are initiated now more lazy (like in the ngtcp2 filter),
  when the stream is actually opened
- suppress reporting on quiche event errors for "other" transfers
  than the current one to not fail a transfer due to faults in
  another one.
- revert recent return value handling for quiche_h3_recv_body()
  to not indicate an error but an EAGAIN situation. We wish quiche
  would document what functions return.

Fixes #11449
Closes #11469
Reported-by: ウさん
9 months agohostip: return IPv6 first for localhost resolves
Daniel Stenberg [Wed, 19 Jul 2023 07:17:15 +0000 (09:17 +0200)] 
hostip: return IPv6 first for localhost resolves

Fixes #11465
Reported-by: Chilledheart on github
Closes #11466

9 months agotool: fix tool_seek_cb build when SIZEOF_CURL_OFF_T > SIZEOF_OFF_T
Harry Sintonen [Wed, 19 Jul 2023 08:22:15 +0000 (11:22 +0300)] 
tool: fix tool_seek_cb build when SIZEOF_CURL_OFF_T > SIZEOF_OFF_T

- a variable was renamed, and some use of it wasn't. this fixes the
  build.

Closes #11468

9 months agoquiche: fix lookup of transfer at multi
Stefan Eissing [Tue, 18 Jul 2023 15:37:58 +0000 (17:37 +0200)] 
quiche: fix lookup of transfer at multi

- refs #11449 where weirdness in quiche multi connection tranfers was
  observed
- fixes lookup of transfer for a quiche event to take the connection
  into account
- formerly, a transfer with the same stream_id, but on another connection
  could be found

Closes #11462

9 months agoRELEASE-NOTES: synced
Daniel Stenberg [Wed, 19 Jul 2023 07:26:46 +0000 (09:26 +0200)] 
RELEASE-NOTES: synced

bump to 8.2.1

9 months agociphers.d: put URL in first column
John Haugabook [Tue, 18 Jul 2023 21:39:08 +0000 (17:39 -0400)] 
ciphers.d: put URL in first column

This makes the URL turn into a link properly when "webified".

Fixes https://github.com/curl/curl-www/issues/270
Closes #11464

9 months agoRELEASE-NOTES: synced curl-8_2_0
Daniel Stenberg [Wed, 19 Jul 2023 06:12:46 +0000 (08:12 +0200)] 
RELEASE-NOTES: synced

8.2.0 release

9 months agoTHANKS-filter: strip out "GitHub"
Daniel Stenberg [Wed, 19 Jul 2023 06:12:46 +0000 (08:12 +0200)] 
THANKS-filter: strip out "GitHub"

9 months agoTHANKS: add contributors from 8.2.0
Daniel Stenberg [Wed, 19 Jul 2023 06:12:46 +0000 (08:12 +0200)] 
THANKS: add contributors from 8.2.0

9 months agoRELEASE-PROCEDURE.md: adjust the release dates
Daniel Stenberg [Tue, 18 Jul 2023 10:06:50 +0000 (12:06 +0200)] 
RELEASE-PROCEDURE.md: adjust the release dates

9 months agoquiche: fix defects found in latest coverity report
Stefan Eissing [Mon, 17 Jul 2023 18:59:16 +0000 (20:59 +0200)] 
quiche: fix defects found in latest coverity report

Closes #11455

9 months agoquiche: avoid NULL deref in debug logging
Daniel Stenberg [Mon, 17 Jul 2023 18:51:17 +0000 (20:51 +0200)] 
quiche: avoid NULL deref in debug logging

Coverity reported "Dereference after null check"

If stream is NULL and the function exits, the logging must not deref it.

Closes #11454

9 months agohttp2: treat initial SETTINGS as a WINDOW_UPDATE
Stefan Eissing [Mon, 17 Jul 2023 10:38:28 +0000 (12:38 +0200)] 
http2: treat initial SETTINGS as a WINDOW_UPDATE

- refs #11426 where spurious stalls on large POST requests
  are reported
- the issue seems to involve the following
  * first stream on connection adds up to 64KB of POST
    data, which is the max default HTTP/2 stream window size
    transfer is set to HOLD
  * initial SETTINGS from server arrive, enlarging the stream
    window. But no WINDOW_UPDATE is received.
  * curl stalls
- the fix un-HOLDs a stream on receiving SETTINGS, not
  relying on a WINDOW_UPDATE from lazy servers

Closes #11450

9 months agongtcp2: assigning timeout, but value is overwritten before used
Daniel Stenberg [Mon, 17 Jul 2023 18:23:22 +0000 (20:23 +0200)] 
ngtcp2: assigning timeout, but value is overwritten before used

Reported by Coverity

Closes #11453

9 months agokrb5: add typecast to please Coverity
Daniel Stenberg [Mon, 17 Jul 2023 18:10:38 +0000 (20:10 +0200)] 
krb5: add typecast to please Coverity

9 months agowolfssl: support setting CA certificates as blob
Derzsi Dániel [Sun, 16 Jul 2023 19:09:36 +0000 (22:09 +0300)] 
wolfssl: support setting CA certificates as blob

Closes #11445

9 months agowolfssl: detect when TLS 1.2 support is not built into wolfssl
Derzsi Dániel [Sun, 16 Jul 2023 10:20:23 +0000 (10:20 +0000)] 
wolfssl: detect when TLS 1.2 support is not built into wolfssl

Closes #11444

9 months agoCI: bump nghttp2 from 1.55.0 to 1.55.1
Graham Campbell [Sat, 15 Jul 2023 18:47:37 +0000 (19:47 +0100)] 
CI: bump nghttp2 from 1.55.0 to 1.55.1

Closes #11442

9 months agocurl: return error when asked to use an unsupported HTTP version
Daniel Stenberg [Sat, 15 Jul 2023 12:00:09 +0000 (14:00 +0200)] 
curl: return error when asked to use an unsupported HTTP version

When one of the following options are used but the libcurl in use does
not support it:

--http2
--http2-prior-knowledge
--proxy-http2

Closes #11440

9 months agocf-socket: don't bypass fclosesocket callback if cancelled before connect
Chris Paulson-Ellis [Fri, 14 Jul 2023 12:15:56 +0000 (13:15 +0100)] 
cf-socket: don't bypass fclosesocket callback if cancelled before connect

After upgrading to 8.1.2 from 7.84.0, I found that sockets were being
closed without calling the fclosesocket callback if a request was
cancelled after the associated socket was created, but before the socket
was connected. This lead to an imbalance of fopensocket & fclosesocket
callbacks, causing problems with a custom event loop integration using
the multi-API.

This was caused by cf_socket_close() calling sclose() directly instead
of calling socket_close() if the socket was not active. For regular TCP
client connections, the socket is activated by cf_socket_active(), which
is only called when the socket completes the connect.

As far as I can tell, this issue has existed since 7.88.0. That is,
since the code in question was introduced by:
    commit 71b7e0161032927cdfb4e75ea40f65b8898b3956
    Author: Stefan Eissing <stefan@eissing.org>
    Date:   Fri Dec 30 09:14:55 2022 +0100

        lib: connect/h2/h3 refactor

Closes #11439

9 months agotool_parsecfg: accept line lengths up to 10M
Daniel Stenberg [Thu, 13 Jul 2023 06:49:20 +0000 (08:49 +0200)] 
tool_parsecfg: accept line lengths up to 10M

Bumped from 100K set in 47dd957daff9

Reported-by: Antoine du Hamel
Fixes #11431
Closes #11435

9 months agoCI: brew fix for openssl in default path
Stefan Eissing [Thu, 13 Jul 2023 09:40:09 +0000 (11:40 +0200)] 
CI: brew fix for openssl in default path

If brew install/update links openssl into /usr/local, it will be found
before anything we add with `-isystem path` to CPP/LDLFAGS.  Get rid of
that by unlinking the keg.

Fixes #11413
Closes #11436

9 months agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 13 Jul 2023 12:58:59 +0000 (14:58 +0200)] 
RELEASE-NOTES: synced

9 months agosectransp: fix EOF handling
Ondřej Koláček [Wed, 12 Jul 2023 03:59:18 +0000 (05:59 +0200)] 
sectransp: fix EOF handling

Regression since the large refactor from 2022

Closes #11427

9 months agochecksrc: quote the file name to work with "funny" letters
Daniel Stenberg [Thu, 13 Jul 2023 11:50:31 +0000 (13:50 +0200)] 
checksrc: quote the file name to work with "funny" letters

Closes #11437

9 months agoHTTP3.md: ngtcp2 updated to v0.17.0 and nghttp3 to v0.13.0
Karthikdasari0423 [Thu, 13 Jul 2023 05:14:03 +0000 (10:44 +0530)] 
HTTP3.md: ngtcp2 updated to v0.17.0 and nghttp3 to v0.13.0

Follow-up to e0093b4b732f6

Closes #11433

9 months agoCURLOPT_MIMEPOST.3: clarify what setting to NULL means
Daniel Stenberg [Wed, 12 Jul 2023 12:55:10 +0000 (14:55 +0200)] 
CURLOPT_MIMEPOST.3: clarify what setting to NULL means

Follow-up to e08382a208d4e480

Closes #11430

9 months agongtcp2: build with 0.17.0 and nghttp3 0.13.0
Tatsuhiro Tsujikawa [Wed, 12 Jul 2023 09:26:28 +0000 (18:26 +0900)] 
ngtcp2: build with 0.17.0 and nghttp3 0.13.0

- ngtcp2_crypto_openssl was renamed to ngtcp2_crypto_quictls.

Closes #11428

9 months agoCI: Bump ngtcp2, nghttp3, and nghttp2
Tatsuhiro Tsujikawa [Wed, 12 Jul 2023 09:26:02 +0000 (18:26 +0900)] 
CI: Bump ngtcp2, nghttp3, and nghttp2

Closes #11428

9 months agoexample/maxconnects: set maxconnect example
James Fuller [Mon, 19 Jun 2023 09:06:57 +0000 (11:06 +0200)] 
example/maxconnects: set maxconnect example

Closes #11343

9 months agohttp2: send HEADER & DATA together if possible
Pontakorn Prasertsuk [Tue, 11 Jul 2023 08:00:29 +0000 (16:00 +0800)] 
http2: send HEADER & DATA together if possible

Closes #11420

9 months agoCI: use wolfSSL 5.6.3 in builds
Daniel Stenberg [Tue, 11 Jul 2023 15:20:31 +0000 (17:20 +0200)] 
CI: use wolfSSL 5.6.3 in builds

No using master anymore

Closes #11424

9 months agofopen: optimize
SaltyMilk [Mon, 10 Jul 2023 19:43:28 +0000 (21:43 +0200)] 
fopen: optimize

Closes #11419

9 months agocmake: make use of snprintf
Daniel Stenberg [Tue, 11 Jul 2023 14:58:58 +0000 (16:58 +0200)] 
cmake: make use of snprintf

Follow-up to 935b1bd4544a23a91d68

Closes #11423

9 months agomacOS: fix taget detection
Stefan Eissing [Mon, 10 Jul 2023 07:39:19 +0000 (09:39 +0200)] 
macOS: fix taget detection

- TARGET_OS_OSX is not always defined on macOS
- this leads to missing symbol Curl_macos_init()
- TargetConditionals.h seems to define these only when
  dynamic targets are enabled (somewhere?)
- this PR fixes that on my macOS 13.4.1
- I have no clue why CI builds worked without it

Follow-up to c7308592fb8ba213fc2c1
Closes #11417

9 months agohostip.c: Move macOS-specific calls into global init call
Stan Hu [Mon, 5 Jun 2023 17:05:48 +0000 (10:05 -0700)] 
hostip.c: Move macOS-specific calls into global init call

https://github.com/curl/curl/pull/7121 introduced a macOS system call
to `SCDynamicStoreCopyProxies`, which is invoked every time an IP
address needs to be resolved.

However, this system call is not thread-safe, and macOS will kill the
process if the system call is run first in a fork. To make it possible
for the parent process to call this once and prevent the crash, only
invoke this system call in the global initialization routine.

In addition, this change is beneficial because it:

1. Avoids extra macOS system calls for every IP lookup.
2. Consolidates macOS-specific initialization in a separate file.

Fixes #11252
Closes #11254

9 months agodocs: use a space after RFC when spelling out RFC numbers
Daniel Stenberg [Sun, 25 Jun 2023 08:50:17 +0000 (10:50 +0200)] 
docs: use a space after RFC when spelling out RFC numbers

Closes #11382

9 months agoimap-append.c: update to make it more likely to work
Margu [Fri, 30 Jun 2023 06:32:13 +0000 (08:32 +0200)] 
imap-append.c: update to make it more likely to work

Fixes #10300
Closes #11397

9 months agotool_writeout_json: fix encoding of control characters
Emanuele Torre [Sun, 9 Jul 2023 14:45:39 +0000 (16:45 +0200)] 
tool_writeout_json: fix encoding of control characters

Control characters without a special escape sequence e.g. %00 or %06
were being encoded as "u0006" instead of "\u0006".

Ref: https://github.com/curl/trurl/pull/214#discussion_r1257487858
Closes #11414

9 months agohttp3/ngtcp2: upload EAGAIN handling
Stefan Eissing [Tue, 27 Jun 2023 10:06:21 +0000 (12:06 +0200)] 
http3/ngtcp2: upload EAGAIN handling

- refs #11389 where IDLE timeouts on upload are reported
- reword ngtcp2 expiry handling to apply to both send+recv
  calls into the filter
- EAGAIN uploads similar to the recent changes in HTTP/2, e.g.
  report success only when send data was ACKed.
- HOLD sending of EAGAINed uploads to avoid cpu busy loops
- rename internal function for consistency with HTTP/2
  implementation

Fixes #11389
Closes #11390

9 months agotool_easysrc.h: correct `easysrc_perform` for `CURL_DISABLE_LIBCURL_OPTION`
Brian Nixon [Fri, 30 Jun 2023 15:03:20 +0000 (16:03 +0100)] 
tool_easysrc.h: correct `easysrc_perform` for `CURL_DISABLE_LIBCURL_OPTION`

Closes #11398

9 months agoRELEASE-NOTES: synced
Daniel Stenberg [Sun, 9 Jul 2023 16:45:34 +0000 (18:45 +0200)] 
RELEASE-NOTES: synced

9 months agotransfer: clear credentials when redirecting to absolute URL 11412/head
Daniel Stenberg [Sat, 8 Jul 2023 21:57:29 +0000 (23:57 +0200)] 
transfer: clear credentials when redirecting to absolute URL

Make sure the user and password for the second request is taken from the
redirected-to URL.

Add test case 899 to verify.

Reported-by: James Lucas
Fixes #11410
Closes #11412

9 months agohyper: fix EOF handling on input
Stefan Eissing [Mon, 26 Jun 2023 09:51:43 +0000 (11:51 +0200)] 
hyper: fix EOF handling on input

We ran out of disc space due to an infinite loop with debug logging

Fixes #11377
Closes #11385
Reported-by: Dan Fandrich
9 months agohttp2: raise header limitations above and beyond
Stefan Eissing [Fri, 7 Jul 2023 08:52:05 +0000 (10:52 +0200)] 
http2: raise header limitations above and beyond

- not quite to infinity
- rewrote the implementation of our internal HTTP/1.x request
  parsing to work with very large lines using dynbufs.
- new default limit is `DYN_HTTP_REQUEST`, aka 1MB, which
  is also the limit of curl's general HTTP request processing.

Fixes #11405
Closes #11407

9 months agocurl_easy_nextheader.3: add missing open parenthesis examples
Juan Cruz Viotti [Sat, 8 Jul 2023 02:16:18 +0000 (22:16 -0400)] 
curl_easy_nextheader.3: add missing open parenthesis examples

Closes #11409
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
9 months agoCI: enable verbose test output on pytest
Dan Fandrich [Fri, 7 Jul 2023 19:01:47 +0000 (12:01 -0700)] 
CI: enable verbose test output on pytest

This shows individual pass/fail status on tests and makes this output
consistent with other jobs' pytest invocations.

10 months agohttp2: fix crash in handling stream weights 11384/head
Stefan Eissing [Mon, 26 Jun 2023 07:03:47 +0000 (09:03 +0200)] 
http2: fix crash in handling stream weights

- Delay the priority handling until the stream has been opened.

- Add test2404 to reproduce and verify.

Weights may change "on the run", which is why there are checks in
general egress handling. These must not trigger when the stream has not
been opened yet.

Reported-by: jbgoog@users.noreply.github.com
Fixes https://github.com/curl/curl/issues/11379
Closes https://github.com/curl/curl/pull/11384

10 months agotests/http: Add mod_h2 directive `H2ProxyRequests`
Stefan Eissing [Wed, 28 Jun 2023 10:37:40 +0000 (12:37 +0200)] 
tests/http: Add mod_h2 directive `H2ProxyRequests`

master of mod_h2 now requires H2ProxyRequests directives for forward
proxying with HTTP/2 to work.

Ref: https://github.com/icing/mod_h2/commit/3897a7086

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

10 months agoCI: make Appveyor job names unique
Dan Fandrich [Wed, 28 Jun 2023 08:07:21 +0000 (01:07 -0700)] 
CI: make Appveyor job names unique

Two otherwise identical mingw-w64 jobs now have their differing compiler
versions mentioned in their names.

10 months agocurl.h: include <sys/select.h> for vxworks
Sheshadri.V [Wed, 21 Jun 2023 05:33:20 +0000 (11:03 +0530)] 
curl.h: include <sys/select.h> for vxworks

Closes #11356

10 months agoCI: enable parallel make in more builds
Dan Fandrich [Fri, 23 Jun 2023 19:51:41 +0000 (12:51 -0700)] 
CI: enable parallel make in more builds

Most CI services provide at least two cores, so enable parallel make
jobs to take advantage of that for builds. Some dependencies aren't safe
to build in parallel so leave those as-is.  Also, rename a few
workflows to eliminate duplicate names and provide a better idea what
they're about.

10 months agoCI: don't install impacket if tests are not run
Dan Fandrich [Thu, 22 Jun 2023 18:13:07 +0000 (11:13 -0700)] 
CI: don't install impacket if tests are not run

It just wastes time and bandwidth and isn't even used.

10 months agoconfigure: the --without forms of the options are also gone
divinity76 [Thu, 22 Jun 2023 22:15:46 +0000 (00:15 +0200)] 
configure: the --without forms of the options are also gone

--without-darwin-ssl and --without-metalink

Closes #11378

10 months agoconfigure: add check for ldap_init_fd
Daniel Stenberg [Thu, 22 Jun 2023 12:34:49 +0000 (14:34 +0200)] 
configure: add check for ldap_init_fd

... as otherwise the configure script will say it is OpenLDAP in the
summary, but not set the USE_OPENLDAP define, therefor not using the
intended OpenLDAP code paths.

Regression since 4d7385446 (7.85.0)
Fixes #11372
Closes #11374
Reported-by: vlkl-sap on github
10 months agocmake: stop CMake from quietly ignoring missing Brotli
Michał Petryka [Thu, 22 Jun 2023 19:30:43 +0000 (21:30 +0200)] 
cmake: stop CMake from quietly ignoring missing Brotli

The CMake project was set to `QUIET` for Brotli instead of
`REQUIRED`. This makes builds unexpectedly ignore missing Brotli even
when `CURL_BROTLI` is enabled.

Closes #11376

10 months agodocs: add more .IP after .RE to fix indentation of generate paragraphs
Emanuele Torre [Thu, 22 Jun 2023 13:08:57 +0000 (15:08 +0200)] 
docs: add more .IP after .RE to fix indentation of generate paragraphs

follow-up from 099f41e097c030077b8ec078f2c2d4038d31353b

I just thought of checking all the other files with .RE, and I found 6
other files that were missing .IP at the end.

Closes #11375

10 months agohttp2: h2 and h2-PROXY connection alive check fixes
Stefan Eissing [Thu, 22 Jun 2023 09:01:53 +0000 (11:01 +0200)] 
http2: h2 and h2-PROXY connection alive check fixes

- fix HTTP/2 check to not declare a connection dead when
  the read attempt results in EAGAIN
- add H2-PROXY alive check as for HTTP/2 that was missing
  and is needed
- add attach/detach around Curl_conn_is_alive() and remove
  these in filter methods
- add checks for number of connections used in some test_10
  proxy tunneling tests

Closes #11368

10 months agohttp2: error stream resets with code CURLE_HTTP2_STREAM
Stefan Eissing [Wed, 21 Jun 2023 13:59:42 +0000 (15:59 +0200)] 
http2: error stream resets with code CURLE_HTTP2_STREAM

- refs #11357, where it was reported that HTTP/1.1 downgrades
  no longer works
- fixed with suggested change
- added test_05_03 and a new handler in the curltest module
  to reproduce that downgrades work

Fixes #11357
Closes #11362
Reported-by: Jay Satiro
10 months agoconnect-timeout.d: mention that the DNS lookup is included
Daniel Stenberg [Thu, 22 Jun 2023 11:18:24 +0000 (13:18 +0200)] 
connect-timeout.d: mention that the DNS lookup is included

Closes #11370

10 months agoquote.d: fix indentation of generated paragraphs
Emanuele Torre [Thu, 22 Jun 2023 11:18:30 +0000 (13:18 +0200)] 
quote.d: fix indentation of generated paragraphs

quote.d was missing a .IP at the end which caused the paragraphs
generated for See-also, Multi, and Example to not be indented correctly.

I also remove a redundant "This option can be used multiple times.", and
replaced .IP "item" with .TP .B "item" to make more clear which lines
are part of the list of commands and which aren't.

Closes #11371

10 months agochecksrc: modernise perl file open
Paul Wise [Wed, 21 Jun 2023 08:50:27 +0000 (10:50 +0200)] 
checksrc: modernise perl file open

Use regular variables and separate file open modes from filenames.

Suggested by perlcritic

Copied from https://github.com/curl/trurl/commit/f2784a9240f47ee28a845

Closes #11358

10 months agoruntests: work around a perl without SIGUSR1
Dan Fandrich [Thu, 22 Jun 2023 02:30:50 +0000 (19:30 -0700)] 
runtests: work around a perl without SIGUSR1

At least msys2 perl v5.32.1 doesn't seem to define this signal. Since
this signal is only used for debugging, just ignore if setting it fails.

Reported-by: Marcel Raad
Fixes #11350
Closes #11366

10 months agoruntests: include missing valgrind package 11365/head
Dan Fandrich [Wed, 21 Jun 2023 22:28:36 +0000 (15:28 -0700)] 
runtests: include missing valgrind package

use valgrind was missing which caused torture tests with valgrind
enabled to fail.

Reported-by: Daniel Stenberg
Fixes #11364
Closes #11365

10 months agoruntests: use more consistent failure lines
Dan Fandrich [Wed, 21 Jun 2023 19:43:48 +0000 (12:43 -0700)] 
runtests: use more consistent failure lines

After a test failure log a consistent log message to make it easier to
parse the log file.  Also, log a consistent message with "ignored" for
failures that cause the test to be not considered at all. These should
perhaps be counted in the skipped category, but this commit does not
change that behaviour.

10 months agoruntests: consistently write the test check summary block
Dan Fandrich [Wed, 21 Jun 2023 19:39:51 +0000 (12:39 -0700)] 
runtests: consistently write the test check summary block

The memory check character was erroneously omitted if the memory
checking file was not available for some reason, making the block of
characters an inconsistent length.

10 months agotest2600: fix the description
Dan Fandrich [Tue, 20 Jun 2023 19:47:33 +0000 (12:47 -0700)] 
test2600: fix the description

It looks like it was cut-and-pasted.

Closes #11354