]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
2 years agoruntests: abort test run after failure without -a 11227/head
Dan Fandrich [Tue, 30 May 2023 20:42:46 +0000 (13:42 -0700)] 
runtests: abort test run after failure without -a

This was broken in a recent refactor and test runs would not stop.

Follow-up to d4a1b5b6

Reported-by: Daniel Stenberg
Fixes #11225
Closes #11227

2 years agoRELEASE-NOTES: synced curl-8_1_2
Daniel Stenberg [Tue, 30 May 2023 06:11:47 +0000 (08:11 +0200)] 
RELEASE-NOTES: synced

8.1.2 release

2 years agoTHANKS: contributors from 8.1.2
Daniel Stenberg [Tue, 30 May 2023 06:13:06 +0000 (08:13 +0200)] 
THANKS: contributors from 8.1.2

2 years agolib1560: verify more scheme guessing
Daniel Stenberg [Mon, 29 May 2023 15:27:22 +0000 (17:27 +0200)] 
lib1560: verify more scheme guessing

- on 2nd level domains
- on names without dots

As mentioned in #11161, "imap.com" will be guessed IMAP

Closes #11219

2 years agopage-header: minor wording polish in the URL segment
Daniel Stenberg [Mon, 29 May 2023 09:44:55 +0000 (11:44 +0200)] 
page-header: minor wording polish in the URL segment

Closes #11217

2 years agopage-header: mention curl version and how to figure out current release
Daniel Stenberg [Mon, 29 May 2023 09:24:57 +0000 (11:24 +0200)] 
page-header: mention curl version and how to figure out current release

Closes #11216

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sun, 28 May 2023 08:29:15 +0000 (10:29 +0200)] 
RELEASE-NOTES: synced

2 years agoconfigure: without pkg-config and no custom path, use -lnghttp2
Daniel Stenberg [Fri, 26 May 2023 08:03:51 +0000 (10:03 +0200)] 
configure: without pkg-config and no custom path, use -lnghttp2

Reported-by: correctmost on github
Fixes #11186
Closes #11210

2 years agocurl: cache the --trace-time value for a second
Stefan Eissing [Fri, 26 May 2023 09:29:25 +0000 (11:29 +0200)] 
curl: cache the --trace-time value for a second

- caches HH:MM:SS computed and reuses it for logging during
  the same second.
- common function for plain log line start formatting

Closes #11211

2 years agolibcurl.m4: remove trailing 'dnl' that causes this to break autoconf
Kev Jackson [Fri, 26 May 2023 13:37:52 +0000 (14:37 +0100)] 
libcurl.m4: remove trailing 'dnl' that causes this to break autoconf

Closes #11212

2 years agohttp3: send EOF indicator early as possible
Stefan Eissing [Thu, 25 May 2023 13:22:12 +0000 (15:22 +0200)] 
http3: send EOF indicator early as possible

- ngtcp2 and quiche implementations relied on the DONE_SEND event
  to forward the EOF for uploads to the libraries. This often
  result in a last 0 length EOF data. Tracking the amount of
  data left to upload allows EOF indication earlier.
- refs #11205 where CloudFlare DoH servers did not like to
  receive the initial upload DATA without EOF and returned
  a 400 Bad Request

Reported-by: Sergey Fionov
Fixes #11205
Closes #11207

2 years agoscripts/contri*sh: no longer grep -v ' '
Daniel Stenberg [Thu, 25 May 2023 12:59:21 +0000 (14:59 +0200)] 
scripts/contri*sh: no longer grep -v ' '

Originally these scripts filtered out names that have no space so that
they better avoid nick names not intended for credits. Such names are
not too commonly used, plus we now give credit even to those.

Additionally: non-latin names, like Asian, don't have spaces at all so
they were also filtered out and had to be manually added which made it
an error-prone operation where Asian names eventually easily fell off by
mistake.

Closes #11206

2 years agocf-socket: restore Curl_sock_assign_addr()
Daniel Stenberg [Thu, 25 May 2023 09:03:56 +0000 (11:03 +0200)] 
cf-socket: restore Curl_sock_assign_addr()

Regression since it was not private. Also used by msh3.c

Follow-up to 8e85764b7bd7f05f5
Reported-by: Gisle Vanem
Fixes #11202
Closes #11204

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 25 May 2023 11:36:49 +0000 (13:36 +0200)] 
RELEASE-NOTES: synced

Taken down to 8.1.2 now for pending patch release

2 years agolibssh: when keyboard-interactive auth fails, try password
Daniel Stenberg [Wed, 24 May 2023 14:34:11 +0000 (16:34 +0200)] 
libssh: when keyboard-interactive auth fails, try password

The state machine had a mistake in that it would not carry on to that
next step.

This also adds a verbose output what methods that are available from the
server and renames the macros that change to the next auth methods to
try.

Reported-by: 左潇峰
Fixes #11196
Closes #11197

2 years agoconfigure: fix build with arbitrary CC and LD_LIBRARY_PATH
Emanuele Torre [Tue, 23 May 2023 09:59:59 +0000 (11:59 +0200)] 
configure: fix build with arbitrary CC and LD_LIBRARY_PATH

Since ./configure and processes that inherit its environment variables
are the only callers of the run-compiler script, we can just save the
current value of the LD_LIBRARY_PATH and CC variables to another pair of
environment variables, and make run-compiler a static script that
simply restores CC and LD_LIBRARY_PATH to the saved value, and before
running the compiler.

This avoids having to inject the values of the variables in the script,
possibly causing problems if they contains spaces, quotes, and other
special characters.

Also add exports in the script just in case LD_LIBRARY_PATH and CC are
not already in the environment.

follow-up from 471dab2

Closes #11182

2 years agourlapi: remove superfluous host name check
Daniel Stenberg [Wed, 24 May 2023 11:50:25 +0000 (13:50 +0200)] 
urlapi: remove superfluous host name check

... as it is checked later more proper.

Closes #11195

2 years agohttp2: fix EOF handling on uploads with auth negotiation
Stefan Eissing [Wed, 24 May 2023 16:48:16 +0000 (18:48 +0200)] 
http2: fix EOF handling on uploads with auth negotiation

- doing a POST with `--digest` does an override on the initial request
  with `Content-Length: 0`, but the http2 filter was unaware of that
  and expected the originally request body. It did therefore not
  send a final DATA frame with EOF flag to the server.
- The fix overrides any initial notion of post size when the `done_send`
  event is triggered by the transfer loop, leading to the EOF that
  is necessary.
- refs #11194. The fault did not happen in testing, as Apache httpd
  never tries to read the request body of the initial request,
  sends the 401 reply and closes the stream. The server used in the
  reported issue however tried to read the EOF and timed out on the
  request.

Reported-by: Aleksander Mazur
Fixes #11194
Cloes #11200

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 23 May 2023 09:12:50 +0000 (11:12 +0200)] 
RELEASE-NOTES: synced

bump to 8.2.0

2 years agolib: remove unused functions, make single-use static
Daniel Stenberg [Mon, 22 May 2023 07:00:16 +0000 (09:00 +0200)] 
lib: remove unused functions, make single-use static

Closes #11174

2 years agoscripts/singleuse.pl: add more API calls
Daniel Stenberg [Mon, 22 May 2023 07:00:07 +0000 (09:00 +0200)] 
scripts/singleuse.pl: add more API calls

2 years agoconfigure: quote the assignments for run-compiler
Christian Hesse [Tue, 23 May 2023 07:40:18 +0000 (09:40 +0200)] 
configure: quote the assignments for run-compiler

Building for multilib failed, as the compiler command contains an
extra argument. That needs quoting.

Regression from b78ca50cb3dda361f9c1

Fixes #11179
Closes #11180

2 years agomisc: fix spelling mistakes
Daniel Stenberg [Sun, 21 May 2023 21:27:43 +0000 (23:27 +0200)] 
misc: fix spelling mistakes

Reported-by: musvaage on github
Fixes #11171
Closes #11172

2 years agoRELEASE-NOTES: synced curl-8_1_1
Daniel Stenberg [Tue, 23 May 2023 06:10:56 +0000 (08:10 +0200)] 
RELEASE-NOTES: synced

curl 8.1.1

2 years agoTHANKS: contributors from the 8.1.1 release
Daniel Stenberg [Tue, 23 May 2023 06:10:56 +0000 (08:10 +0200)] 
THANKS: contributors from the 8.1.1 release

2 years agodocs: fix fuzzing documentation link
Dan Fandrich [Mon, 22 May 2023 22:37:28 +0000 (15:37 -0700)] 
docs: fix fuzzing documentation link

Follow-up to 4c712a1b

2 years agoCI: add an Alpine build with MUSL
Dan Fandrich [Mon, 22 May 2023 20:09:54 +0000 (13:09 -0700)] 
CI: add an Alpine build with MUSL

MUSL is another libc implementation which has its own unique issues
worth testing.

Ref: #11140
Closes #11178

2 years agoruntests: add a missing \n at the end of a log message
Dan Fandrich [Mon, 22 May 2023 21:23:52 +0000 (14:23 -0700)] 
runtests: add a missing \n at the end of a log message

2 years agoSECURITY-PROCESS.md: link security advisory doc and fix typo
correctmost on github [Mon, 22 May 2023 19:22:53 +0000 (15:22 -0400)] 
SECURITY-PROCESS.md: link security advisory doc and fix typo

Closes #11177

2 years agoTODO: build curl with Windows Unicode support
Daniel Stenberg [Mon, 22 May 2023 15:08:45 +0000 (17:08 +0200)] 
TODO: build curl with Windows Unicode support

Closes #7229

2 years agoKNOWN_BUGS: hyper memory-leaks
Daniel Stenberg [Mon, 22 May 2023 15:06:54 +0000 (17:06 +0200)] 
KNOWN_BUGS: hyper memory-leaks

Closes #10803

2 years agohttp/2: unstick uploads
Stefan Eissing [Mon, 22 May 2023 11:20:51 +0000 (13:20 +0200)] 
http/2: unstick uploads

- refs #11157 and #11175 where uploads get stuck or lead to RST streams
- fixes our h2 send behaviour to continue sending in the nghttp2 session
  as long as it wants to. This will empty our send buffer as long as
  the remote stream/connection window allows.
- in case the window is exhausted, the data remaining in the send buffer
  will wait for a WINDOW_UPDATE from the server. Which is a socket event
  that engages our transfer loop again
- the problem in the issue was that we did not exhaust the window, but
  left data in the sendbuffer and no further socket events did happen.
  The server was just waiting for us to send more.
- relatedly, there was an issue fixed that closing a stream with KEEP_HOLD
  set kept the transfer from shutting down - as it should have - leading
  to a timeout.

Closes #11176

2 years agoworkflows/macos: add a job using gcc + debug + secure transport
Daniel Stenberg [Fri, 19 May 2023 21:43:55 +0000 (23:43 +0200)] 
workflows/macos: add a job using gcc + debug + secure transport

2 years agolib: fix conversion warnings with gcc on macOS
Jay Satiro [Sat, 20 May 2023 03:44:07 +0000 (23:44 -0400)] 
lib: fix conversion warnings with gcc on macOS

2 years agosectransp.c: make the code c89 compatible
Daniel Stenberg [Fri, 19 May 2023 20:35:05 +0000 (22:35 +0200)] 
sectransp.c: make the code c89 compatible

Follow-up to dd2bb485521c2ec713001b3a

Reported-by: FeignClaims on github
Fixes #11155
Closes #11159

2 years agoRevert "urlapi: respect CURLU_ALLOW_SPACE and CURLU_NO_AUTHORITY for redirects"
Emanuele Torre [Sun, 21 May 2023 03:01:35 +0000 (05:01 +0200)] 
Revert "urlapi: respect CURLU_ALLOW_SPACE and CURLU_NO_AUTHORITY for redirects"

This reverts commit df6c2f7b544f1f35f2a3e0be11f345affeb6fe9c.
(It only keep the test case that checks redirection to an absolute URL
without hostname and CURLU_NO_AUTHORITY).

I originally wanted to make CURLU_ALLOW_SPACE accept spaces in the
hostname only because I thought
curl_url_set(CURLUPART_URL, CURLU_ALLOW_SPACE) was already accepting
them, and they were only not being accepted in the hostname when
curl_url_set(CURLUPART_URL) was used for a redirection.

That is not actually the case, urlapi never accepted hostnames with
spaces, and a hostname with a space in it never makes sense.
I probably misread the output of my original test when I they were
normally accepted when using CURLU_ALLOW_SPACE, and not redirecting.

Some other URL parsers seems to allow space in the host part of the URL,
e.g. both python3's urllib.parse module, and Chromium's javascript URL
object allow spaces (chromium percent escapes the spaces with %20),
(they also both ignore TABs, and other whitespace characters), but those
URLs with spaces in the hostname are useless, neither python3's requests
module nor Chromium's window.location can actually use them.

There is no reason to add support for URLs with spaces in the host,
since it was not a inconsistency bug; let's revert that patch before it
makes it into release. Sorry about that.

I also reverted the extra check for CURLU_NO_AUTHORITY since that does
not seem to be necessary, CURLU_NO_AUTHORITY already worked for
redirects.

Closes #11169

2 years agoruntests: use the correct fd after select
Dan Fandrich [Fri, 19 May 2023 04:11:57 +0000 (21:11 -0700)] 
runtests: use the correct fd after select

The code was using the wrong fd when determining which runner was ready
with a response.

Ref: #10818
Closes #11160

2 years agotest425: fix the log directory for the upload
Dan Fandrich [Fri, 19 May 2023 05:00:41 +0000 (22:00 -0700)] 
test425: fix the log directory for the upload

This must be %LOGDIR to let it work with parallel tests.

Ref: #10969

2 years agoruntests: handle interrupted reads from IPC pipes
Dan Fandrich [Wed, 17 May 2023 05:34:40 +0000 (22:34 -0700)] 
runtests: handle interrupted reads from IPC pipes

These can be interrupted by signals, especially SIGINT to shut down, and
must be restarted so the IPC call arrives correctly. If the read just
returns an error instead, the IPC calling state will go out of sync and
a proper shutdown won't happen.

Ref: #10818

2 years agohttp2: upload improvements
Stefan Eissing [Sat, 20 May 2023 10:26:04 +0000 (12:26 +0200)] 
http2: upload improvements

Make send buffer smaller to have progress and "upload done" reporting
closer to reality. Fix handling of send "drain" condition to no longer
trigger once the transfer loop reports it is done sending. Also do not
trigger the send "drain" on RST streams.

Background:
- a upload stall was reported in #11157 that timed out
- test_07_33a reproduces a problem with such a stall if the
  server 404s the request and RSTs the stream.
- test_07_33b verifies a successful PUT, using the parameters
  from #11157 and checks success

Ref: #11157
Closes #11165

2 years agohttp2: increase stream window size to 10 MB
Stefan Eissing [Sat, 20 May 2023 16:11:12 +0000 (18:11 +0200)] 
http2: increase stream window size to 10 MB

Reported-by: pandada8 on github
Fixes #11162
Closes #11167

2 years agolib: rename struct 'http_req' to 'httpreq'
Daniel Stenberg [Sat, 20 May 2023 09:55:20 +0000 (11:55 +0200)] 
lib: rename struct 'http_req' to 'httpreq'

Because FreeBSD 14 kidnapped the name.
Ref: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271526

Fixes #11163
Closes #11164

2 years agocmake: avoid `list(PREPEND)` for compatibility
Viktor Szakats [Thu, 18 May 2023 21:02:17 +0000 (21:02 +0000)] 
cmake: avoid `list(PREPEND)` for compatibility

`list(PREPEND)` requires CMake v3.15, our minimum is v3.7.

Ref: https://cmake.org/cmake/help/latest/command/list.html#prepend

Regression from 1e3319a167d2f32d295603167486e9e88af9bb4e

Reported-by: Keitagit-kun on Github
Fixes #11141
Closes #11144

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 19 May 2023 14:38:20 +0000 (16:38 +0200)] 
RELEASE-NOTES: synced

2 years agongtcp2: proper handling of uint64_t when adjusting send buffer
Stefan Eissing [Fri, 19 May 2023 10:00:46 +0000 (12:00 +0200)] 
ngtcp2: proper handling of uint64_t when adjusting send buffer

Fixes #11149
Closes #11153

2 years agongtcp2: fix compiler warning about possible null-deref
Stefan Eissing [Fri, 19 May 2023 07:33:59 +0000 (09:33 +0200)] 
ngtcp2: fix compiler warning about possible null-deref

- compiler analyzer did not include the call context for this
  static function where the condition had already been checked.
- eleminating the problem by making stream a call parameter

Fixes #11147
Closes #11151

2 years agodocs: document that curl_url_cleanup(NULL) is a safe no-op
Emanuele Torre [Fri, 19 May 2023 01:34:07 +0000 (03:34 +0200)] 
docs: document that curl_url_cleanup(NULL) is a safe no-op

This has always been the case, but it was not documented.

The paragraph was copied verbatim from curl_easy_cleanup.3

Closes #11150

2 years agoselect: avoid returning an error on EINTR from select() or poll()
Antoine Pitrou [Thu, 18 May 2023 19:39:05 +0000 (21:39 +0200)] 
select: avoid returning an error on EINTR from select() or poll()

This was already done for the poll() and select() calls
made directly from Curl_poll(), but was missed in
Curl_wait_ms(), which is called when there are no fds
to wait on.

Fixes #11135
Closes #11143

2 years agovquic.c: make recvfrom_packets static, avoid compiler warning
Daniel Stenberg [Thu, 18 May 2023 23:02:28 +0000 (01:02 +0200)] 
vquic.c: make recvfrom_packets static, avoid compiler warning

warning: no previous prototype for 'recvfrom_packets'

Reported-by: Keitagit-kun on github
Fixes #11146
Closes #11148

2 years agourlapi: allow numerical parts in the host name
Daniel Stenberg [Wed, 17 May 2023 22:31:17 +0000 (00:31 +0200)] 
urlapi: allow numerical parts in the host name

It can only be an IPv4 address if all parts are all digits and no more than
four parts, otherwise it is a host name. Even slightly wrong IPv4 will now be
passed through as a host name.

Regression from 17a15d88467 shipped in 8.1.0

Extended test 1560 accordingly.

Reported-by: Pavel Kalyugin
Fixes #11129
Closes #11131

2 years agohttp2: double http request parser max line length
Emilio Cobos Álvarez [Thu, 18 May 2023 16:22:57 +0000 (18:22 +0200)] 
http2: double http request parser max line length

This works around #11138, by doubling the limit, and should be a
relatively safe fix.

Ideally the buffer would grow as needed and there would be no need for a
limit? But that might be follow-up material.

Fixes #11138
Closes #11139

2 years agoconfigure: fix --help alignment
Emanuele Torre [Thu, 18 May 2023 19:16:56 +0000 (21:16 +0200)] 
configure: fix --help alignment

AC_ARG_ENABLE seems to only trim off whitespace from the start and end
of its help-string argument, while prepending two spaces of indentation
to all lines.

This means that the two spaces of indentation between the --enable-rtsp
and the --disable-rtsp line were not removed causing ./configure --help
to print:

  Optional Features:
    [...]
    --enable-rtsp           Enable RTSP support
      --disable-rtsp          Disable RTSP support

I removed the indentation to fix the issue, now it prints:

  Optional Features:
    [...]
    --enable-rtsp           Enable RTSP support
    --disable-rtsp          Disable RTSP support

The --enable-hsts and --disable-hsts lines had the same problems, and
have been fixed too.

Closes #11142

2 years agocmake: repair cross compiling
Deal(一线灵) [Wed, 17 May 2023 17:21:48 +0000 (01:21 +0800)] 
cmake: repair cross compiling

It cannot *run* code for testing purposes when cross-compiling.

Closes #11130

2 years agoconfigure: generate a script to run the compiler
Daniel Stenberg [Tue, 16 May 2023 14:51:14 +0000 (16:51 +0200)] 
configure: generate a script to run the compiler

in the CURL_RUN_IFELSE macro, with LD_LIBRARY_PATH set to the value of
the configure invoke, and not the value that might be used later,
intended for the execution of the output the compiler ouputs.

For example when the compiler uses the same library (like libz) that
configure checks for.

Reported-by: Jonas Bülow
Fixes #11114
Closes #11120

2 years agocf-socket: completely remove the disabled USE_RECV_BEFORE_SEND_WORKAROUND
Stefan Eissing [Tue, 16 May 2023 08:24:07 +0000 (10:24 +0200)] 
cf-socket: completely remove the disabled USE_RECV_BEFORE_SEND_WORKAROUND

Closes #11118

2 years agourlapi: respect CURLU_ALLOW_SPACE and CURLU_NO_AUTHORITY for redirects
Emanuele Torre [Thu, 18 May 2023 08:48:19 +0000 (10:48 +0200)] 
urlapi: respect CURLU_ALLOW_SPACE and CURLU_NO_AUTHORITY for redirects

curl_url_set(uh, CURLUPART_URL, redirurl, flags)  was not respecing
CURLU_ALLOW_SPACE and CURLU_NO_AUTHORITY in the host part of redirurl
when redirecting to an absolute URL.

Closes #11136

2 years agohostip: move easy_lock.h include above curl_memory.h
Colin Cross [Thu, 18 May 2023 17:54:09 +0000 (10:54 -0700)] 
hostip: move easy_lock.h include above curl_memory.h

Similar to #9561, move easy_lock.h above curl_memory.h to fix building
against musl libc.

Closes #11140

2 years agocurl_easy_getinfo: clarify on return data types
Hind Montassif [Wed, 17 May 2023 12:17:06 +0000 (14:17 +0200)] 
curl_easy_getinfo: clarify on return data types

Closes #11126

2 years agochecksrc: disallow spaces before labels
Emanuele Torre [Thu, 18 May 2023 04:54:18 +0000 (06:54 +0200)] 
checksrc: disallow spaces before labels

Out of 415 labels throughout the code base, 86 of those labels were
not at the start of the line. Which means labels always at the start of
the line is the favoured style overall with 329 instances.

Out of the 86 labels not at the start of the line:
* 75 were indented with the same indentation level of the following line
* 8 were indented with exactly one space
* 2 were indented with one fewer indentation level then the following
  line
* 1 was indented with the indentation level of the following line minus
  three space (probably unintentional)

Co-Authored-By: Viktor Szakats
Closes #11134

2 years agocookie: update the comment on cookie length and size limits
Daniel Stenberg [Wed, 17 May 2023 14:12:48 +0000 (16:12 +0200)] 
cookie: update the comment on cookie length and size limits

To refer to the proper cookie RFC and the upcoming RFC refresh.

Closes #11127

2 years agourl: provide better error message when URLs fail to parse
Daniel Stenberg [Thu, 18 May 2023 12:27:01 +0000 (14:27 +0200)] 
url: provide better error message when URLs fail to parse

By providing the URL API error message into the error message.

Ref: #11129
Closes #11137

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 18 May 2023 11:45:54 +0000 (13:45 +0200)] 
RELEASE-NOTES: synced

bumped to 8.1.1

2 years agoos400: update chkstrings.c
jonrumsey [Wed, 17 May 2023 19:59:06 +0000 (20:59 +0100)] 
os400: update chkstrings.c

Compensate changes for recent changes to urldata.h to reclassify
STRING_AWS_SIGV4.

Fixes #11132
Closes #11133

2 years agoRELEASE-NOTES: synced curl-8_1_0
Daniel Stenberg [Wed, 17 May 2023 06:05:04 +0000 (08:05 +0200)] 
RELEASE-NOTES: synced

2 years agoTHANKS: contributors from the 8.1.0 release
Daniel Stenberg [Wed, 17 May 2023 06:05:04 +0000 (08:05 +0200)] 
THANKS: contributors from the 8.1.0 release

2 years agohostip: include easy_lock.h before using GLOBAL_INIT_IS_THREADSAFE
Daniel Stenberg [Tue, 16 May 2023 21:40:42 +0000 (23:40 +0200)] 
hostip: include easy_lock.h before using GLOBAL_INIT_IS_THREADSAFE

Since that header file is the only place that define can be defined.

Reported-by: Marc Deslauriers
Follow-up to 13718030ad4b3209

Closes #11121

2 years agoaws-sigv4.d: fix region identifier in example
Thomas Taylor [Mon, 15 May 2023 19:51:59 +0000 (15:51 -0400)] 
aws-sigv4.d: fix region identifier in example

Closes #11117

2 years agomlc_config.json: remove this linkcheck CI job config file
Philip H [Mon, 15 May 2023 10:44:50 +0000 (12:44 +0200)] 
mlc_config.json: remove this linkcheck CI job config file

Closes #11113

2 years agossh: Add support for libssh2 read timeout
Daniel Silverstone [Wed, 26 Apr 2023 08:44:57 +0000 (09:44 +0100)] 
ssh: Add support for libssh2 read timeout

Hook the new (1.11.0 or newer) libssh2 support for setting a read timeout
into the SERVER_RESPONSE_TIMEOUT option.  With this done, clients can use
the standard curl response timeout setting to also control the time that
libssh2 will wait for packets from a slow server.  This is necessary to
enable use of very slow SFTP servers.

Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
Closes #10965

2 years agoGIT-INFO: add --with-openssl
Osama Albahrani [Sun, 14 May 2023 03:09:48 +0000 (23:09 -0400)] 
GIT-INFO: add --with-openssl

Closes #11110

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Sat, 13 May 2023 19:03:59 +0000 (21:03 +0200)] 
RELEASE-NOTES: synced

2 years agomd(4|5): don't use deprecated iOS functions
Marcel Raad [Thu, 11 May 2023 07:23:13 +0000 (09:23 +0200)] 
md(4|5): don't use deprecated iOS functions

They are marked as deprecated in iOS 13.0, which might result in
warnings-as-errors.

Also, use `*_MIN_REQUIRED` instead of `*_MIN_ALLOWED`, which seems to
be what's currently used.

Bug: https://github.com/curl/curl/issues/11098
Closes https://github.com/curl/curl/pull/11102

2 years agomd4: only build when used
Marcel Raad [Thu, 11 May 2023 07:06:33 +0000 (09:06 +0200)] 
md4: only build when used

Its only usage in curl_ntlm_core.c is guarded by `USE_CURL_NTLM_CORE`,
so let's use this here too.

Ref: https://github.com/curl/curl/issues/11098
Closes https://github.com/curl/curl/pull/11102

2 years agowrite-out.d: Use response_code in example
Vítor Galvão [Fri, 12 May 2023 18:16:50 +0000 (19:16 +0100)] 
write-out.d: Use response_code in example

Closes #11107

2 years agourl: fix null dispname for --connect-to option
Shohei Maeda [Fri, 12 May 2023 12:06:26 +0000 (21:06 +0900)] 
url: fix null dispname for --connect-to option

Closes #11106

2 years agotest2306: verify getting a second response with folded headers
Daniel Stenberg [Fri, 12 May 2023 10:41:09 +0000 (12:41 +0200)] 
test2306: verify getting a second response with folded headers

Reproduces the isue #11101 and verifies the fix.

Verifies a17b2a503f

2 years agoheaders: clear (possibly) lingering pointer in init
Daniel Stenberg [Thu, 11 May 2023 07:56:51 +0000 (09:56 +0200)] 
headers: clear (possibly) lingering pointer in init

The "prevhead" pointer is used for the headers storage but was not
cleared correctly in init, which made it possible to act up when a
handle is reused.

Reported-by: Steve Herrell
Fixes #11101
Closes #11103

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Fri, 12 May 2023 15:30:51 +0000 (17:30 +0200)] 
RELEASE-NOTES: synced

2 years agongtcp2: use 0.15.0
Daniel Stenberg [Fri, 12 May 2023 10:51:58 +0000 (12:51 +0200)] 
ngtcp2: use 0.15.0

- nghttp3 0.11.0
- nghttp2 1.53.0

Adapt to new API calls

Closes #11031

2 years agoopenssl: fix indent
Jay Satiro [Wed, 10 May 2023 18:03:30 +0000 (14:03 -0400)] 
openssl: fix indent

2 years agoCURLOPT_DNS_CACHE_TIMEOUT.3: fix spelling
Daniel Stenberg [Tue, 9 May 2023 17:13:19 +0000 (19:13 +0200)] 
CURLOPT_DNS_CACHE_TIMEOUT.3: fix spelling

Follow-up to 9ed7d56e044f5aa1b29

Closes #11096

2 years agohostip: use time_t for storing oldest DNS entry
Daniel Stenberg [Tue, 9 May 2023 08:01:52 +0000 (10:01 +0200)] 
hostip: use time_t for storing oldest DNS entry

Theoretically, the oldest time could overflow an int. In practice that
won't happen, but let's do this to please analyzers.

Follow-up to 9ed7d56e044f5aa1b2928ccde6245d0

Pointed out by Coverity.
Closes #11094

2 years agohttp: free the url before storing a new copy
Daniel Stenberg [Tue, 9 May 2023 06:31:11 +0000 (08:31 +0200)] 
http: free the url before storing a new copy

To avoid a memory-leak.

Reported-by: Hiroki Kurosawa
Closes #11093

2 years agocompressed.d: clarify the words on "not notifying headers"
Daniel Stenberg [Tue, 9 May 2023 06:28:47 +0000 (08:28 +0200)] 
compressed.d: clarify the words on "not notifying headers"

Reported-by: Dylan Anthony
Fixes #11091
Closes #11092

2 years agolibssh2: free fingerprint better
Daniel Stenberg [Mon, 8 May 2023 12:33:54 +0000 (14:33 +0200)] 
libssh2: free fingerprint better

Reported-by: Wei Chong Tan
Closes #11088

2 years agoCURLOPT_IPRESOLVE.3: clarify that this for host names, not IP addresses
Daniel Stenberg [Mon, 8 May 2023 12:28:38 +0000 (14:28 +0200)] 
CURLOPT_IPRESOLVE.3: clarify that this for host names, not IP addresses

Reported-by: Harry Sintonen
Closes #11087

2 years agohostip: enforce a maximum DNS cache size independent of timeout value
Daniel Stenberg [Mon, 8 May 2023 09:11:36 +0000 (11:11 +0200)] 
hostip: enforce a maximum DNS cache size independent of timeout value

To reduce the damage an application can cause if using -1 or other
ridiculous timeout values and letting the cache live long times.

The maximum number of entries in the DNS cache is now totally
arbitrarily and hard-coded set to 29999.

Closes #11084

2 years agohostip: store dns timeout as 'int'
Daniel Stenberg [Mon, 8 May 2023 08:40:47 +0000 (10:40 +0200)] 
hostip: store dns timeout as 'int'

... because it set and held as an 'int' elsewhere and can never be
larger.

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 8 May 2023 12:41:11 +0000 (14:41 +0200)] 
RELEASE-NOTES: synced

2 years agotool_operate: refuse (--data or --form) and --continue-at combo
Daniel Stenberg [Sun, 7 May 2023 22:14:33 +0000 (00:14 +0200)] 
tool_operate: refuse (--data or --form) and --continue-at combo

libcurl assumes that a --continue-at resumption is done to continue an
upload using the read callback and neither --data nor --form use
that and thus won't do what the user wants. Whatever the user wants
with this strange combination.

Add test 426 to verify.

Reported-by: Smackd0wn on github
Fixes #11081
Closes #11083

2 years agotransfer: refuse POSTFIELDS + RESUME_FROM combo
Daniel Stenberg [Sun, 7 May 2023 22:12:25 +0000 (00:12 +0200)] 
transfer: refuse POSTFIELDS + RESUME_FROM combo

The code assumes that such a resume is wanting to continue an upload
using the read callback, and since POSTFIELDS is done without callback
libcurl will just misbehave.

This combo will make the transfer fail with CURLE_BAD_FUNCTION_ARGUMENT
with an explanation in the error message.

Reported-by: Smackd0wn on github
Fixes #11081
Closes #11083

2 years agoipv4.d/ipv6.d: they are "mutex", not "boolean"
Daniel Stenberg [Mon, 8 May 2023 10:01:09 +0000 (12:01 +0200)] 
ipv4.d/ipv6.d: they are "mutex", not "boolean"

... which for example means they do not have --no-* versions.

Reported-by: Harry Sintonen
Fixes #11085
Closes #11086

2 years agodocs/SECURITY-ADVISORY.md: how to write a curl security advisory
Daniel Stenberg [Sun, 7 May 2023 16:33:57 +0000 (18:33 +0200)] 
docs/SECURITY-ADVISORY.md: how to write a curl security advisory

Closes #11080

2 years agoMANUAL.md: add dict example for looking up a single definition
nobedee on github [Fri, 5 May 2023 20:29:16 +0000 (16:29 -0400)] 
MANUAL.md: add dict example for looking up a single definition

Closes #11077

2 years agoruntests: fix -c option when run with valgrind
Dan Fandrich [Fri, 5 May 2023 04:18:36 +0000 (21:18 -0700)] 
runtests: fix -c option when run with valgrind

The curl binary argument wasn't being quoted properly. This seems to
have broken at some point after quoting was added in commit 606b29fe.

Reported-by: Daniel Stenberg
Ref: #11073
Fixes #11074
Closes #11076

2 years agoruntests: support creating more than one runner process
Dan Fandrich [Tue, 2 May 2023 21:36:17 +0000 (14:36 -0700)] 
runtests: support creating more than one runner process

The controller currently only creates and uses one, but more are now
possible.

Ref: #10818

2 years agoruntests: spawn a new process for the test runner
Dan Fandrich [Sun, 30 Apr 2023 05:11:25 +0000 (22:11 -0700)] 
runtests: spawn a new process for the test runner

When the -j option is given, a new process is spawned in which the test
programs are run and from which test servers are started. Only one
process can be started at once, but this is sufficient to test that the
infrastructure can isolate those functions in a new task. There should
be no visible difference between the two modes at the moment.

Ref: #10818
Closes #11064

2 years agoruntests: turn singletest() into a state machine
Dan Fandrich [Sat, 29 Apr 2023 03:49:28 +0000 (20:49 -0700)] 
runtests: turn singletest() into a state machine

This allows it to run in a non-blocking manner.

Ref: #10818

2 years agoruntests: change runner interface to be asynchronous
Dan Fandrich [Wed, 26 Apr 2023 01:03:54 +0000 (18:03 -0700)] 
runtests: change runner interface to be asynchronous

Program arguments are marshalled and then written to the end of a pipe
which is later read from and the arguments unmarshalled before the
desired function is called normally.  The function return values are
then marshalled and written into another pipe when is later read from
and unmarshalled before being returned to the caller.

The implementation is currently blocking but can be made non-blocking
without any changes to the API.  This allows calling multiple runners
without blocking in the future.

Ref: #10818

2 years agoruntests: call citest_finishtest in singletest
Dan Fandrich [Fri, 28 Apr 2023 19:52:07 +0000 (12:52 -0700)] 
runtests: call citest_finishtest in singletest

This is where citest_starttest is called.

Ref: #10818