]> git.ipfire.org Git - thirdparty/curl.git/log
thirdparty/curl.git
2 years 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

2 years 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
2 years 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

2 years 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>
2 years 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.

2 years 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

2 years 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

2 years 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.

2 years 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

2 years 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.

2 years 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.

2 years 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

2 years 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
2 years 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

2 years 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

2 years 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

2 years 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
2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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.

2 years 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.

2 years 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

2 years agoTODO: "Support HTTP/2 for HTTP(S) proxies" *done*
Daniel Stenberg [Wed, 21 Jun 2023 08:08:49 +0000 (10:08 +0200)] 
TODO: "Support HTTP/2 for HTTP(S) proxies" *done*

2 years agocf-socket: move ctx declaration under HAVE_GETPEERNAME
humbleacolyte [Tue, 20 Jun 2023 12:02:21 +0000 (17:02 +0500)] 
cf-socket: move ctx declaration under HAVE_GETPEERNAME

Closes #11352

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Tue, 20 Jun 2023 07:20:54 +0000 (09:20 +0200)] 
RELEASE-NOTES: synced

2 years agoexample/connect-to: show CURLOPT_CONNECT_TO
Daniel Stenberg [Mon, 19 Jun 2023 07:14:38 +0000 (09:14 +0200)] 
example/connect-to: show CURLOPT_CONNECT_TO

Closes #11340

2 years agohyper: unslow
Stefan Eissing [Mon, 19 Jun 2023 10:11:53 +0000 (12:11 +0200)] 
hyper: unslow

- refs #11203 where hyper was reported as being slow
- fixes hyper_executor_poll to loop until it is out of
  tasks as advised by @seanmonstar in https://github.com/hyperium/hyper/issues/3237
- added a fix in hyper io handling for detecting EAGAIN
- added some debug logs to see IO results
- pytest http/1.1 test cases pass
- pytest h2 test cases fail on connection reuse. HTTP/2
  connection reuse does not seem to work. Hyper submits
  a request on a reused connection, curl's IO works and
  thereafter hyper declares `Hyper: [1] operation was canceled: connection closed`
  on stderr without any error being logged before.

Fixes #11203
Reported-by: Gisle Vanem
Advised-by: Sean McArthur
Closes #11344

2 years agoHTTP/2: upload handling fixes
Stefan Eissing [Mon, 19 Jun 2023 08:53:23 +0000 (10:53 +0200)] 
HTTP/2: upload handling fixes

- fixes #11242 where 100% CPU on uploads was reported
- fixes possible stalls on last part of a request body when
  that information could not be fully send on the connection
  due to an EAGAIN
- applies the same EGAIN handling to HTTP/2 proxying

Reported-by: Sergey Alirzaev
Fixed #11242
Closes #11342

2 years agoexample/opensslthreadlock: remove
Daniel Stenberg [Mon, 19 Jun 2023 07:19:56 +0000 (09:19 +0200)] 
example/opensslthreadlock: remove

This shows how to setup OpenSSL mutex callbacks, but this is not
necessary since OpenSSL 1.1.0 - meaning that no currently supported
OpenSSL version requires this anymore

Closes #11341

2 years agolibtest: display the times after a test timeout error
Dan Fandrich [Fri, 16 Jun 2023 20:30:09 +0000 (13:30 -0700)] 
libtest: display the times after a test timeout error

This is to help with test failure debugging.

Ref: #11328
Closes #11329

2 years agotest2600: bump a test timeout
Dan Fandrich [Fri, 16 Jun 2023 19:23:28 +0000 (12:23 -0700)] 
test2600: bump a test timeout

Case 1 failed at least once on GHA by going 30 msec too long.

Ref: #11328

2 years agoruntests: better detect and handle pipe errors in the controller
Dan Fandrich [Fri, 16 Jun 2023 03:10:24 +0000 (20:10 -0700)] 
runtests: better detect and handle pipe errors in the controller

Errors reading and writing to the pipes are now better detected and
propagated up to the main test loop so it can be cleanly shut down. Such
errors are usually due to a runner dying so it doesn't make much sense
to try to continue the test run.

2 years agoruntests: cleanly abort the runner if the controller dies
Dan Fandrich [Wed, 14 Jun 2023 22:28:39 +0000 (15:28 -0700)] 
runtests: cleanly abort the runner if the controller dies

If the controller dies unexpectedly, have the runner stop its servers
and exit cleanly. Otherwise, the orphaned servers will stay running in
the background.

2 years agoruntests: improve error logging
Dan Fandrich [Wed, 14 Jun 2023 22:27:07 +0000 (15:27 -0700)] 
runtests: improve error logging

Give more information about test harness error conditions to help figure
out what might be wrong. Print some internal test state when SIGUSR1 is
sent to runtests.pl.

Ref: #11328

2 years agoruntests: better handle ^C during slow tests
Dan Fandrich [Wed, 14 Jun 2023 22:18:36 +0000 (15:18 -0700)] 
runtests: better handle ^C during slow tests

Since the SIGINT handler now just sets a flag that must be checked in the
main controller loop, make sure that runs periodically.  Rather than
blocking on a response from a test runner near the end of the test run,
add a short timeout to allow it.

2 years agoruntests: rename server command file
Dan Fandrich [Wed, 14 Jun 2023 22:11:40 +0000 (15:11 -0700)] 
runtests: rename server command file

The name ftpserver.cmd was historical and has been used for more than
ftp for many years now. Rename it to plain server.cmd to reduce
confusion.

2 years agotests: improve reliability of TFTP tests
Dan Fandrich [Wed, 14 Jun 2023 21:19:26 +0000 (14:19 -0700)] 
tests: improve reliability of TFTP tests

Stop checking the timeout used by the client under test (for most
tests). The timeout will change if the TFTP test server is slow (such as
happens on an overprovisioned CI server) because the client will retry
and reduce its timeout, and the actual value is not important for most
tests.

test285 is changed a different way, by increasing the connect timeout.
This improves test coverage by allowing the changed timeout value to be
checked, but improves reliability with a carefully-chosen timeout that
not only allows twice the time to respond as before, but also allows
several retries before the client will change its timeout value.

Ref: #11328

2 years agocf-socket: skip getpeername()/getsockname for TFTP
Daniel Stenberg [Sat, 17 Jun 2023 22:18:12 +0000 (00:18 +0200)] 
cf-socket: skip getpeername()/getsockname for TFTP

Since the socket is not connected then the call fails. When the call
fails, failf() is called to write an error message that is then
surviving and is returned when the *real* error occurs later. The
earlier, incorrect, error therefore hides the actual error message.

This could be seen in stderr for test 1007

Test 1007 has now been extended to verify the stderr message.

Closes #11332

2 years agoexample/crawler: make it use a few more options
Daniel Stenberg [Mon, 19 Jun 2023 07:06:41 +0000 (09:06 +0200)] 
example/crawler: make it use a few more options

For show, but reasonable

2 years agolibcurl-ws.3: mention raw mode
Daniel Stenberg [Sun, 18 Jun 2023 18:57:29 +0000 (20:57 +0200)] 
libcurl-ws.3: mention raw mode

Closes #11339

2 years agoexample/default-scheme: set the default scheme for schemeless URLs
Daniel Stenberg [Sun, 18 Jun 2023 17:54:15 +0000 (19:54 +0200)] 
example/default-scheme: set the default scheme for schemeless URLs

Closes #11338

2 years agoexample/hsts-preload: show one way to HSTS preload
Daniel Stenberg [Sun, 18 Jun 2023 17:33:44 +0000 (19:33 +0200)] 
example/hsts-preload: show one way to HSTS preload

Closes #11337

2 years agoexamples/http-options: show how to send "OPTIONS *"
Daniel Stenberg [Sat, 17 Jun 2023 22:32:00 +0000 (00:32 +0200)] 
examples/http-options: show how to send "OPTIONS *"

With CURLOPT_REQUEST_TARGET.

Also add use of CURLOPT_QUICK_EXIT to show.

Closes #11333

2 years agoexamples: make use of CURLOPT_(REDIR_|)PROTOCOLS_STR
Daniel Stenberg [Sat, 17 Jun 2023 22:37:22 +0000 (00:37 +0200)] 
examples: make use of CURLOPT_(REDIR_|)PROTOCOLS_STR

To show how to use them

Closes #11334

2 years agoexamples/smtp-mime: use CURLOPT_MAIL_RCPT_ALLOWFAILS
Daniel Stenberg [Sat, 17 Jun 2023 22:40:13 +0000 (00:40 +0200)] 
examples/smtp-mime: use CURLOPT_MAIL_RCPT_ALLOWFAILS

For show

Closes #11335

2 years agohttp: rectify the outgoing Cookie: header field size check
Daniel Stenberg [Sat, 17 Jun 2023 21:59:14 +0000 (23:59 +0200)] 
http: rectify the outgoing Cookie: header field size check

Previously it would count the size of the entire outgoing request and
not just the size of only the Cookie: header field - which was the
intention.

This could make the check be off by several hundred bytes in some cases.

Closes #11331

2 years agolib: fix some format specifiers
Jay Satiro [Fri, 16 Jun 2023 03:02:48 +0000 (23:02 -0400)] 
lib: fix some format specifiers

- Use CURL_FORMAT_CURL_OFF_T where %zd was erroneously used for some
  curl_off_t variables.

- Use %zu where %zd was erroneously used for some size_t variables.

Prior to this change some of the Windows CI tests were failing because
in Windows 32-bit targets have a 32-bit size_t and a 64-bit curl_off_t.
When %zd was used for some curl_off_t variables then only the lower
32-bits was read and the upper 32-bits would be read for part or all of
the next specifier.

Fixes https://github.com/curl/curl/issues/11327
Closes https://github.com/curl/curl/pull/11321

2 years agotest427: add `cookies` feature and keyword
Marcel Raad [Thu, 15 Jun 2023 10:43:53 +0000 (12:43 +0200)] 
test427: add `cookies` feature and keyword

This test doesn't work with `--disable-cookies`.

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

2 years agoimap: Provide method to disable SASL if it is advertised 10041/head
Chris Talbot [Mon, 5 Dec 2022 23:05:01 +0000 (18:05 -0500)] 
imap: Provide method to disable SASL if it is advertised

- Implement AUTH=+LOGIN for CURLOPT_LOGIN_OPTIONS to prefer plaintext
  LOGIN over SASL auth.

Prior to this change there was no method to be able to fall back to
LOGIN if an IMAP server advertises SASL capabilities. However, this may
be desirable for e.g. a misconfigured server.

Per: https://www.ietf.org/rfc/rfc5092.html#section-3.2

";AUTH=<enc-auth-type>" looks to be the correct way to specify what
authenication method to use, regardless of SASL or not.

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

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Thu, 15 Jun 2023 13:59:06 +0000 (15:59 +0200)] 
RELEASE-NOTES: synced

2 years agoexamples/multi-debugcallback.c: avoid the bool typedef
Daniel Stenberg [Thu, 15 Jun 2023 07:39:09 +0000 (09:39 +0200)] 
examples/multi-debugcallback.c: avoid the bool typedef

Apparently this cannot be done in c23

Reported-by: Cristian Rodríguez
Fixes #11299
Closes #11319

2 years agodocs/libcurl/libcurl.3: cleanups and improvements
Daniel Stenberg [Wed, 14 Jun 2023 13:37:53 +0000 (15:37 +0200)] 
docs/libcurl/libcurl.3: cleanups and improvements

Closes #11317

2 years agolibcurl-ws.3: fix typo
Daniel Stenberg [Wed, 14 Jun 2023 21:38:22 +0000 (23:38 +0200)] 
libcurl-ws.3: fix typo

2 years agocurl_ws_*.3: enhance
Daniel Stenberg [Wed, 14 Jun 2023 13:50:13 +0000 (15:50 +0200)] 
curl_ws_*.3: enhance

- all: SEE ALSO the libcurl-ws man page
- send: add example and return value information
- meta: mention that the returned data is read-only

Closes #11318

2 years agodocs/libcurl/libcurl-ws.3: see also CURLOPT_WS_OPTIONS
Daniel Stenberg [Wed, 14 Jun 2023 11:36:38 +0000 (13:36 +0200)] 
docs/libcurl/libcurl-ws.3: see also CURLOPT_WS_OPTIONS

2 years agodocs/libcurl/libcurl-ws.3: minor polish
Daniel Stenberg [Wed, 14 Jun 2023 11:30:50 +0000 (13:30 +0200)] 
docs/libcurl/libcurl-ws.3: minor polish

2 years agolibcurl-ws.3. WebSocket API overview
Daniel Stenberg [Wed, 14 Jun 2023 08:57:50 +0000 (10:57 +0200)] 
libcurl-ws.3. WebSocket API overview

Closes #11314

2 years agolibcurl-url.3: also mention CURLUPART_ZONEID
Daniel Stenberg [Wed, 14 Jun 2023 08:18:14 +0000 (10:18 +0200)] 
libcurl-url.3: also mention CURLUPART_ZONEID

... and sort the two part-using lists alphabetically

2 years agofopen: fix conversion warning on 32-bit Android
Marcel Raad [Tue, 13 Jun 2023 09:13:59 +0000 (11:13 +0200)] 
fopen: fix conversion warning on 32-bit Android

When building for 32-bit ARM or x86 Android, `st_mode` is defined as
`unsigned int` instead of `mode_t`, resulting in a
-Wimplicit-int-conversion clang warning because `mode_t` is
`unsigned short`. Add a cast to silence the warning.

Ref: https://android.googlesource.com/platform/bionic/+/refs/tags/ndk-r25c/libc/include/sys/stat.h#86
Closes https://github.com/curl/curl/pull/11313

2 years agohttp2: fix variable type
Marcel Raad [Mon, 12 Jun 2023 14:02:00 +0000 (16:02 +0200)] 
http2: fix variable type

`max_recv_speed` is `curl_off_t`, so using `size_t` might result in
-Wconversion GCC warnings for 32-bit `size_t`. Visible in the NetBSD
ARM autobuilds.

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

2 years agovtls: fix potentially uninitialized local variable warnings
Daniel Stenberg [Mon, 12 Jun 2023 21:17:33 +0000 (23:17 +0200)] 
vtls: fix potentially uninitialized local variable warnings

Follow-up from a4a5e438ae533c

Closes #11310

2 years agotimeval: use CLOCK_MONOTONIC_RAW if available
Daniel Stenberg [Fri, 9 Jun 2023 18:42:51 +0000 (20:42 +0200)] 
timeval: use CLOCK_MONOTONIC_RAW if available

Reported-by: Harry Sintonen
Ref: #11288
Closes #11291

2 years agotool: add curl command line option `--trace-ids`
Stefan Eissing [Sun, 11 Jun 2023 09:02:29 +0000 (11:02 +0200)] 
tool: add curl command line option `--trace-ids`

- added and documented --trace-ids to prepend (after the timestamp)
  the transfer and connection identifiers to each verbose log line
- format is [n-m] with `n` being the transfer id and `m` being the
  connection id. In case there is not valid connection id, print 'x'.
- Log calls with a handle that has no transfer id yet, are written
  without any ids.

Closes #11185

2 years agolib: add CURLINFO_CONN_ID and CURLINFO_XFER_ID
Stefan Eissing [Tue, 23 May 2023 10:48:58 +0000 (12:48 +0200)] 
lib: add CURLINFO_CONN_ID and CURLINFO_XFER_ID

- add an `id` long to Curl_easy, -1 on init
- once added to a multi (or its own multi), it gets
  a non-negative number assigned by the connection cache
- `id` is unique among all transfers using the same
  cache until reaching LONG_MAX where it will wrap
  around. So, not unique eternally.
- CURLINFO_CONN_ID returns the connection id attached to
  data or, if none present, data->state.lastconnect_id
- variables and type declared in tool for write out

Closes #11185

2 years agoCURLOPT_INFILESIZE.3: mention -1 triggers chunked
Daniel Stenberg [Mon, 12 Jun 2023 07:25:48 +0000 (09:25 +0200)] 
CURLOPT_INFILESIZE.3: mention -1 triggers chunked

Ref: #11300
Closes #11304

2 years agoCI: openssl-3.0.9+quic
Philip H [Sun, 16 Apr 2023 19:44:09 +0000 (21:44 +0200)] 
CI: openssl-3.0.9+quic

Closes #11296

2 years agoHTTP3.md: update openssl version
Karthikdasari0423 [Sun, 11 Jun 2023 06:21:55 +0000 (11:51 +0530)] 
HTTP3.md: update openssl version

Closes #11297

2 years agovtls: avoid memory leak if sha256 call fails
Daniel Stenberg [Mon, 12 Jun 2023 12:10:37 +0000 (14:10 +0200)] 
vtls: avoid memory leak if sha256 call fails

... in the pinned public key handling function.

Reported-by: lizhuang0630 on github
Fixes #11306
Closes #11307

2 years agoexamples/ipv6: disable on win32
Daniel Stenberg [Mon, 12 Jun 2023 07:46:22 +0000 (09:46 +0200)] 
examples/ipv6: disable on win32

I can't make if_nametoindex() work there

Follow-up to c23dc42f3997acf23

Closes #11305

2 years agotool_operate: allow cookie lines up to 8200 bytes
Daniel Stenberg [Mon, 12 Jun 2023 07:01:30 +0000 (09:01 +0200)] 
tool_operate: allow cookie lines up to 8200 bytes

Since this option might set multiple cookies in the same line, it does
not make total sense to cap this at 4096 bytes, which is the limit for a
single cookie name or value.

Closes #11303

2 years agotest427: verify sending more cookies than fit in a 8190 bytes line
Daniel Stenberg [Mon, 12 Jun 2023 07:00:21 +0000 (09:00 +0200)] 
test427: verify sending more cookies than fit in a 8190 bytes line

curl will then only populate the header with cookies that fit, dropping
ones that otherwise would have been sent

Ref: https://curl.se/mail/lib-2023-06/0020.html

Closes #11303

2 years agotestutil: allow multiple %-operators on the same line
Daniel Stenberg [Mon, 12 Jun 2023 06:59:11 +0000 (08:59 +0200)] 
testutil: allow multiple %-operators on the same line

Closes #11303

2 years agodocs: update CURLOPT_UPLOAD.3
Oleg Jukovec [Sun, 11 Jun 2023 20:25:44 +0000 (23:25 +0300)] 
docs: update CURLOPT_UPLOAD.3

The behavior of CURLOPT_UPLOAD differs from what is described in the
documentation. The option automatically adds the 'Transfer-Encoding:
chunked' header if the upload size is unknown.

Closes #11300

2 years agoRELEASE-NOTES: synced
Daniel Stenberg [Mon, 12 Jun 2023 07:16:55 +0000 (09:16 +0200)] 
RELEASE-NOTES: synced

2 years agoCURLOPT_AWS_SIGV4.3: remove unused variable from example
Daniel Stenberg [Mon, 12 Jun 2023 06:19:58 +0000 (08:19 +0200)] 
CURLOPT_AWS_SIGV4.3: remove unused variable from example

Closes #11302

2 years agoexamples/https.c: use CURLOPT_CA_CACHE_TIMEOUT
Daniel Stenberg [Fri, 9 Jun 2023 17:37:31 +0000 (19:37 +0200)] 
examples/https.c: use CURLOPT_CA_CACHE_TIMEOUT

for demonstration purposes

Closes #11290

2 years agoexample/ipv6: feature CURLOPT_ADDRESS_SCOPE in use
Daniel Stenberg [Fri, 9 Jun 2023 08:00:12 +0000 (10:00 +0200)] 
example/ipv6: feature CURLOPT_ADDRESS_SCOPE in use

Closes #11282

2 years agodocs: Update HTTP3.md for newer ngtcp2 and nghttp3
Karthikdasari0423 [Sat, 10 Jun 2023 16:52:37 +0000 (22:22 +0530)] 
docs: Update HTTP3.md for newer ngtcp2 and nghttp3

Follow-up to fb9b9b58

Ref: #11184
Closes #11295

2 years agodocs: update the supported ngtcp2 and nghttp3 versions
Dan Fandrich [Sat, 10 Jun 2023 15:06:08 +0000 (08:06 -0700)] 
docs: update the supported ngtcp2 and nghttp3 versions

Follow-up to cae9d10b

Ref: #11184
Closes #11294

2 years agotests: fix error messages & handling around sockets
Dan Fandrich [Wed, 7 Jun 2023 16:56:49 +0000 (09:56 -0700)] 
tests: fix error messages & handling around sockets

The wrong error code was checked on Windows on UNIX socket failures,
which could have caused all UNIX sockets to be reported as having
errored and the tests therefore skipped. Also, a useless error message
was displayed on socket errors in many test servers on Windows because
strerror() doesn't work on WinSock error codes; perror() is overridden
there to work on all errors and is used instead.

Ref #11258
Closes #11265

2 years agoCURLOPT_SSH_PRIVATE_KEYFILE.3: expand on the file search
Daniel Stenberg [Fri, 9 Jun 2023 17:10:30 +0000 (19:10 +0200)] 
CURLOPT_SSH_PRIVATE_KEYFILE.3: expand on the file search

Reported-by: atjg on github
Ref: #11287
Closes #11289

2 years agongtcp2: use ever increasing timestamp in io
Stefan Eissing [Fri, 9 Jun 2023 14:32:14 +0000 (16:32 +0200)] 
ngtcp2: use ever increasing timestamp in io

- ngtcp2 v0.16.0 asserts that timestamps passed to its function
  will only ever increase.
- Use a context shared between ingress/egress operations that
  uses a shared timestamp, regularly updated during calls.

Closes #11288

2 years agoGHA: use nghttp2 1.54.0 for the ngtcp2 jobs
Daniel Stenberg [Wed, 7 Jun 2023 11:59:50 +0000 (13:59 +0200)] 
GHA: use nghttp2 1.54.0 for the ngtcp2 jobs

2 years agoGHA: ngtcp2: use 0.16.0 and nghttp3 0.12.0
Philip H [Sun, 4 Jun 2023 11:47:23 +0000 (13:47 +0200)] 
GHA: ngtcp2: use 0.16.0 and nghttp3 0.12.0

2 years agongtcp2: build with 0.16.0 and nghttp3 0.12.0
Daniel Stenberg [Sun, 4 Jun 2023 21:14:41 +0000 (23:14 +0200)] 
ngtcp2: build with 0.16.0 and nghttp3 0.12.0

- moved to qlog_write
- crypto => encryption
- CRYPTO => ENCRYPTION
- removed "_is_"
- ngtcp2_conn_shutdown_stream_read and
  ngtcp2_conn_shutdown_stream_write got flag arguments
- the nghttp3_callbacks struct got a recv_settings callback

Closes #11184

2 years agoexample/http2-download: set CURLOPT_BUFFERSIZE
Daniel Stenberg [Fri, 9 Jun 2023 08:07:10 +0000 (10:07 +0200)] 
example/http2-download: set CURLOPT_BUFFERSIZE

Primarily because no other example sets it, and remove the disabling of
the certificate check because we should not recommend that.

Closes #11284

2 years agoexample/crawler: also set CURLOPT_AUTOREFERER
Daniel Stenberg [Fri, 9 Jun 2023 08:03:28 +0000 (10:03 +0200)] 
example/crawler: also set CURLOPT_AUTOREFERER

Could make sense, and it was not used in any example before.

Closes #11283

2 years agotls13-ciphers.d: include Schannel
Wyatt OʼDay [Thu, 8 Jun 2023 10:13:17 +0000 (03:13 -0700)] 
tls13-ciphers.d: include Schannel

Closes #11271

2 years agocurl_pushheader_byname/bynum.3: document in their own man pages
Daniel Stenberg [Fri, 9 Jun 2023 10:38:25 +0000 (12:38 +0200)] 
curl_pushheader_byname/bynum.3: document in their own man pages

These two functions were added in 7.44.0 when CURLMOPT_PUSHFUNCTION was
introduced but always lived a life in the shadows, embedded in the
CURLMOPT_PUSHFUNCTION man page. Until now.

It makes better sense and gives more visibility to document them in
their own stand-alone man pages.

Closes #11286

2 years agocurl_mprintf.3: minor fix of the example
Daniel Stenberg [Fri, 9 Jun 2023 09:29:41 +0000 (11:29 +0200)] 
curl_mprintf.3: minor fix of the example

2 years agocurl_url_set: enforce the max string length check for all parts
Daniel Stenberg [Thu, 8 Jun 2023 11:40:52 +0000 (13:40 +0200)] 
curl_url_set: enforce the max string length check for all parts

Update the docs and test 1559 accordingly

Closes #11273

2 years agoexamples/ftpuploadresume.c: add use of CURLOPT_ACCEPTTIMEOUT_MS
Daniel Stenberg [Thu, 8 Jun 2023 14:30:31 +0000 (16:30 +0200)] 
examples/ftpuploadresume.c: add use of CURLOPT_ACCEPTTIMEOUT_MS

For show

Closes #11277

2 years agoexamples/unixsocket.c: example using CURLOPT_UNIX_SOCKET_PATH
Daniel Stenberg [Thu, 8 Jun 2023 14:25:14 +0000 (16:25 +0200)] 
examples/unixsocket.c: example using CURLOPT_UNIX_SOCKET_PATH

and alternatively CURLOPT_ABSTRACT_UNIX_SOCKET

Closes #11276

2 years agodocs: fix missing parameter names in examples
Anssi Kolehmainen [Thu, 8 Jun 2023 15:57:19 +0000 (18:57 +0300)] 
docs: fix missing parameter names in examples

Closes #11278

2 years agourlapi: have *set(PATH) prepend a slash if one is missing
Daniel Stenberg [Thu, 8 Jun 2023 11:15:09 +0000 (13:15 +0200)] 
urlapi: have *set(PATH) prepend a slash if one is missing

Previously the code would just do that for the path when extracting the
full URL, which made a subsequent curl_url_get() of the path to
(unexpectedly) still return it without the leading path.

Amend lib1560 to verify this. Clarify the curl_url_set() docs about it.

Bug: https://curl.se/mail/lib-2023-06/0015.html
Closes #11272
Reported-by: Pedro Henrique
2 years agoruntests; give each server a unique log lock file
Dan Fandrich [Mon, 5 Jun 2023 21:50:15 +0000 (14:50 -0700)] 
runtests; give each server a unique log lock file

Logs are written by several servers and all of them must be finished
writing before the test results can be determined. This means each
server must have its own lock file rather than sharing a single one,
which is how it was done up to now. Previously, the first server to
complete a test would clear the lock before the other server was done,
which caused flaky tests.

Lock files are now all found in their own directory, so counting locks
equals counting the files in that directory.  The result is that the
proxy logs are now reliably written which actually changes the expected
output for two tests.

Fixes #11231
Closes #11259

2 years agoruntests: make test file directories in log/N 11267/head
Dan Fandrich [Wed, 7 Jun 2023 22:06:11 +0000 (15:06 -0700)] 
runtests: make test file directories in log/N

Test files in subdirectories were not created after parallel test log
directories were moved down a level due to a now-bad comparison.

Follow-up to 92d7dd39

Ref #11264
Closes #11267