Commit Graph

30684 Commits

Author SHA1 Message Date
Daniel Stenberg
9946410861
CI: use wolfSSL 5.6.3 in builds
No using master anymore

Closes #11424
2023-07-11 20:07:22 +02:00
SaltyMilk
0c667188e0
fopen: optimize
Closes #11419
2023-07-11 19:43:51 +02:00
Daniel Stenberg
3b0eb3cd5c
cmake: make use of snprintf
Follow-up to 935b1bd454

Closes #11423
2023-07-11 19:42:47 +02:00
Stefan Eissing
c73b2f8207
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 c7308592fb
Closes #11417
2023-07-11 00:14:40 +02:00
Stan Hu
c7308592fb
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
2023-07-09 19:16:58 +02:00
Daniel Stenberg
22c92a6d51
docs: use a space after RFC when spelling out RFC numbers
Closes #11382
2023-07-09 19:13:33 +02:00
Margu
9bf89bdc5b
imap-append.c: update to make it more likely to work
Fixes #10300
Closes #11397
2023-07-09 18:58:39 +02:00
Emanuele Torre
8484ad09da
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
2023-07-09 18:57:01 +02:00
Stefan Eissing
15b131352b
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
2023-07-09 18:53:25 +02:00
Brian Nixon
933aedcde8
tool_easysrc.h: correct easysrc_perform for CURL_DISABLE_LIBCURL_OPTION
Closes #11398
2023-07-09 18:50:16 +02:00
Daniel Stenberg
8bad37ef42
RELEASE-NOTES: synced 2023-07-09 18:45:34 +02:00
Daniel Stenberg
dd4d1a2695
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
2023-07-09 11:12:13 +02:00
Stefan Eissing
def99e011e
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
2023-07-08 23:01:24 +02:00
Stefan Eissing
4e88024f0c
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
2023-07-08 22:27:29 +02:00
Juan Cruz Viotti
2e0bad3f18
curl_easy_nextheader.3: add missing open parenthesis examples
Closes #11409
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
2023-07-08 22:22:17 +02:00
Dan Fandrich
356208c16f 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.
2023-07-07 13:47:34 -07:00
Stefan Eissing
29f33b3400 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
2023-06-28 16:32:16 -04:00
Stefan Eissing
cae12480fc 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
2023-06-28 15:37:10 -04:00
Dan Fandrich
9d6d47099b CI: make Appveyor job names unique
Two otherwise identical mingw-w64 jobs now have their differing compiler
versions mentioned in their names.
2023-06-28 01:07:21 -07:00
Sheshadri.V
891e25edb8
curl.h: include <sys/select.h> for vxworks
Closes #11356
2023-06-25 10:42:47 +02:00
Dan Fandrich
fb802b521a 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.
2023-06-24 14:40:39 -07:00
Dan Fandrich
cfab581041 CI: don't install impacket if tests are not run
It just wastes time and bandwidth and isn't even used.
2023-06-24 14:40:39 -07:00
divinity76
238b7bdf09
configure: the --without forms of the options are also gone
--without-darwin-ssl and --without-metalink

Closes #11378
2023-06-24 23:18:54 +02:00
Daniel Stenberg
0ac6108856
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
2023-06-23 10:42:55 +02:00
Michał Petryka
4e115a19f8
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
2023-06-23 10:40:05 +02:00
Emanuele Torre
55dfb9ea47
docs: add more .IP after .RE to fix indentation of generate paragraphs
follow-up from 099f41e097

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
2023-06-22 18:04:26 +02:00
Stefan Eissing
873b958d0b
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
2023-06-22 17:32:15 +02:00
Stefan Eissing
d435bf1baf
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
2023-06-22 17:07:27 +02:00
Daniel Stenberg
27242bbad3
connect-timeout.d: mention that the DNS lookup is included
Closes #11370
2023-06-22 15:00:24 +02:00
Emanuele Torre
099f41e097
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
2023-06-22 14:56:40 +02:00
Paul Wise
7f669aa0f1
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
2023-06-22 11:03:02 +02:00
Dan Fandrich
0526525c33 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
2023-06-21 23:22:07 -07:00
Dan Fandrich
3cfd9f2378 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
2023-06-21 15:33:01 -07:00
Dan Fandrich
62a9731533 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.
2023-06-21 14:42:37 -07:00
Dan Fandrich
69e3485e0d 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.
2023-06-21 12:39:51 -07:00
Dan Fandrich
47c04d7136 test2600: fix the description
It looks like it was cut-and-pasted.

Closes #11354
2023-06-21 11:46:01 -07:00
Daniel Stenberg
96e4d6809c
TODO: "Support HTTP/2 for HTTP(S) proxies" *done* 2023-06-21 10:08:57 +02:00
humbleacolyte
51f6a0dc1a
cf-socket: move ctx declaration under HAVE_GETPEERNAME
Closes #11352
2023-06-21 08:34:50 +02:00
Daniel Stenberg
93b8be802a
RELEASE-NOTES: synced 2023-06-20 09:20:54 +02:00
Daniel Stenberg
67ebc0d5b0
example/connect-to: show CURLOPT_CONNECT_TO
Closes #11340
2023-06-20 09:13:54 +02:00
Stefan Eissing
81e6793ec9
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
2023-06-20 09:11:41 +02:00
Stefan Eissing
65937f0d63
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
2023-06-20 09:09:25 +02:00
Daniel Stenberg
ff1e885632
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
2023-06-20 09:06:23 +02:00
Dan Fandrich
2c5c7abb15 libtest: display the times after a test timeout error
This is to help with test failure debugging.

Ref: #11328
Closes #11329
2023-06-19 17:14:27 -07:00
Dan Fandrich
39c234c429 test2600: bump a test timeout
Case 1 failed at least once on GHA by going 30 msec too long.

Ref: #11328
2023-06-19 17:14:27 -07:00
Dan Fandrich
089a84660d 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.
2023-06-19 17:14:27 -07:00
Dan Fandrich
7d01ec8b74 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.
2023-06-19 17:14:27 -07:00
Dan Fandrich
2fe52412b1 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
2023-06-19 17:14:27 -07:00
Dan Fandrich
847e42d868 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.
2023-06-19 17:14:27 -07:00
Dan Fandrich
1177c741b9 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.
2023-06-19 17:14:27 -07:00