Commit Graph

32089 Commits

Author SHA1 Message Date
Stefan Eissing
3e16c97fe9
tests: check caddy server version to match test expectations
- new caddy servers no longer return 200 on POSTs, but 405
  as they should

Closes #13405
2024-04-18 16:10:42 +02:00
Daniel Stenberg
1634330474
curl_url_set.md: extended
Closes #13404
2024-04-18 11:10:46 +02:00
Daniel Stenberg
3eac21d86b
urlapi: add CURLU_GET_EMPTY for empty queries and fragments
By default the API inhibits empty queries and fragments extracted.
Unless this new flag is set.

This also makes the behavior more consistent: without it set, zero
length queries and fragments are considered not present in the URL. With
the flag set, they are returned as a zero length strings if they were in
fact present in the URL.

This applies when extracting the individual query and fragment
components and for the full URL.

Closes #13396
2024-04-18 10:37:28 +02:00
Daniel Stenberg
5379dbc248
RELEASE-NOTES: synced 2024-04-17 22:53:40 +02:00
Daniel Stenberg
4dc414c3ec
lib1560: test with leading zeroes and more IPv4 versions
Inspired by WHATWG URL Spec test inputs

Closes #13400
2024-04-17 22:45:24 +02:00
MonkeybreadSoftware
4746b8362b
smtp: result of Curl_bufq_cread was not used
return the result back to the caller.

Closes #13398
2024-04-17 22:44:39 +02:00
Daniel Stenberg
c37b694e46
urlapi: fix relative redirects to fragment-only
Using the URL API for a redirect URL when the redirected-to string
starts with a hash, ie is only a fragment, the API would produce the
wrong final URL.

Adjusted test 1560 to test for several new redirect cases.

Closes #13394
2024-04-17 22:41:47 +02:00
Jiwoo Park
5fb018494d
url: fix use of an uninitialized variable
Closes #13399
2024-04-17 22:34:47 +02:00
Patrick Monnerat
411d12886e
os400: sync with latest changes
- Conversion support for new version info character field rtmp_version.
- New ILE/RPG declarations.

Closes #13402
2024-04-17 22:33:40 +02:00
Daniel Stenberg
c22f463071
ngtcp2: fix macro use
macro "H3_STREAM_CTX" requires 2 arguments, but only 1 given

Follow-up to c6655f7029

Closes #13401
2024-04-17 15:55:30 +02:00
MonkeybreadSoftware
b879edef7e
sendf: fix two typos in comments
The parameters are named data, not date.

Closes #13393
2024-04-17 14:28:24 +02:00
MonkeybreadSoftware
0b4401a4fb
lib: silence warnings on comma misuse
Building curl with -Wcomma, I see warnings about "possible misuse of
comma operator here" and moving fields assignment out of the for() fixes
it.

Closes #13392
2024-04-17 14:26:35 +02:00
Stefan Eissing
c6655f7029
http/2, http/3: decouple stream state from easy handle
- add `Curl_hash_offt` as hashmap between a `curl_off_t` and
  an object. Use this in h2+h3 connection filters to associate
  `data->id` with the internal stream state.
- changed implementations of all affected connection filters
- removed `h2_ctx*` and `h3_ctx*` from `struct HTTP` and thus
  the easy handle
- solves the problem of attaching "foreign protocol" easy handles
  during connection shutdown

Test 1616 verifies the new hash functions.

Closes #13204
2024-04-17 14:24:09 +02:00
Daniel Stenberg
c03556fb18
ROADMAP: remove completed entries, mention websocket 2024-04-17 10:35:12 +02:00
Daniel Stenberg
c2372e2a15
THANKS-filter: name fixes 2024-04-17 09:48:45 +02:00
MonkeybreadSoftware
eb4fe6c634
winbuild: add ENABLE_WEBSOCKETS option
Closes #13232
2024-04-17 09:15:13 +02:00
Daniel Stenberg
7afb0e1b9e
dmaketgz: compacter
Removes the need for disabling shellcheck warnings.

Follow-up to d28f74913c
Proposed-by: Viktor Szakats
Closes #13391
2024-04-17 07:58:16 +02:00
Dan Fandrich
5b94eced85 tests: Fix uninitialized value warning
The check for an option must be predicated on options existing at all.

Follow-up to f7cc9e91
2024-04-16 19:53:22 -07:00
MonkeybreadSoftware
add22feeef
idn: add native AppleIDN (icucore) support for macOS/iOS
I implemented the IDN functions for macOS and iOS using Unicode
libraries coming with macOS and iOS.

Builds and runs here on macOS 14.2.1. Also verified to load and
run on older macOS version 10.13.

Build requires macOS SDK 13 or equivalent.

Set `-DUSE_APPLE_IDN=ON` CMake option to enable it.
With autotools and other build tools, set these manual options:
```
CPPFLAGS=-DUSE_APPLE_IDN
LIBS=-licucore
```

Completes TODO 1.6.

TODO: add autotools option and feature-detection.

Refs: #5330 #5371
Co-authored-by: Viktor Szakats
Closes #13246
2024-04-17 00:24:09 +02:00
Stefan Eissing
08d10d2a00
http3: extend download abort tests, fixes in ngtcp2
- fix flow handling in ngtcp2 to ACK data on streams
  we abort ourself.
- extend test_02_23* cases to also run for h3
- skip test_02_23* for OpenSSL QUIC as it gets stalled
  on progressing the connection

Closes #13374
2024-04-16 23:48:22 +02:00
Daniel Stenberg
f7cc9e9177
tests: add -q as first option when invoking curl for tests
To reduce the risk that the user running the tests has a .curlrc present
that messes things up.

Support 'option="no-q"' for the <command> tag to switch it off on demand.
Use this new feature in test 433 and 436.

Ref: #13284
Closes #13387
2024-04-16 23:40:23 +02:00
Daniel Stenberg
d28f74913c
dmaketgz: release tarball generation using docker
For easier reproducibility.

Mention using this script in RELEASE-PROCEDURE

Closes #13388
2024-04-16 23:38:55 +02:00
Viktor Szakats
dad126b840
cmake: update ECH code and minor fixups
- `openssl_check_symbol_exists()` expects a 4th argument now.
  Follow-up to edc2702a1f #13373

- minor comment/script touch-ups.
  Follow-up to a362962b72 #11922

- fix indentation.

Closes #13383
2024-04-16 19:47:13 +02:00
Viktor Szakats
57af812e5f
tests: fix shellcheck issues in ech_tests.sh
Add double-quotes where missing.

Follow-up to a362962b72 #11922
Closes #13382
2024-04-16 19:47:13 +02:00
Viktor Szakats
5d3016adf7
dist: add ECH files to tarball
Also sort `EXTRA_DIST` list in `tests/Makefile.am` and make it diffable.

Follow-up to a362962b72 #11922
Closes #13381
2024-04-16 19:47:13 +02:00
Viktor Szakats
09f0390e11
openvms: look for USE_IPV6 in config.h (was: ENABLE_IPV6)
The OpenVMS script `config_h.com` is parsing the config header
generated by autotools. Let's make it look for the macro name we now
use universally across the codebase.

Follow-up to e411c98f70 #13349
Closes #13360
2024-04-16 19:38:47 +02:00
daniel-j-h
41c03b4c98
Dockerfile: for release automation and reproducibility
Closes #13250
2024-04-16 16:53:25 +02:00
Stefan Eissing
270a25c011
cw-out: improved error handling
- remember error encountered in invoking write callback and always fail
  afterwards without further invokes

- check behaviour in test_02_17 with h2-pausing client

Reported-by: Pavel Kropachev
Fixes #13337
Closes #13340
2024-04-16 15:52:10 +02:00
Daniel Stenberg
5e3fd347c5
version: add "ECH" as a feature
If available

Follow-up to a362962b7
Closes #13378
2024-04-16 13:24:08 +02:00
Daniel Stenberg
a1ecd0ba6b
CURLOPT_ECH: polish
- remove the pointer to build instructions, it won't work in manpages
- add see-also
- minor white space edits

Closes #13379
2024-04-16 09:58:45 +02:00
Viktor Szakats
f81f60206d
tidy-up: whitespace [ci skip] 2024-04-16 09:53:39 +02:00
Viktor Szakats
3774b8a9a7
mbedtls: fix building with v3 in CMake Unity mode
Before this patch the internal feature detection macro
`HAS_MBEDTLS_RESULT_CODE_BASED_FUNCTIONS` was defined in three files,
with an incomplete logic in one of them. In Unity mode that spilled
into another source file and broke the build.

Closes #13377
2024-04-16 09:36:43 +02:00
Viktor Szakats
edc2702a1f
cmake: add librtmp/rtmpdump option and detection
Add CMake option `USE_LIBRTMP`. Disabled by default.

This library requires OpenSSL TLS-backend when linked statically.

Follow-up to 6eb9e65781 #13364
Closes #13373
2024-04-16 09:36:42 +02:00
Stephen Farrell
a362962b72
TLS: add support for ECH (Encrypted Client Hello)
An EXPERIMENTAL feature used with CURLOPT_ECH and --ech.

Closes #11922
2024-04-16 08:10:53 +02:00
Daniel Stenberg
565d28dc8e
RELEASE-NOTES: synced 2024-04-15 23:47:08 +02:00
Daniel Stenberg
be659030ba
multi: introduce SETUP state for better timeouts
Since we can go to the CONNECT state from PENDING, potentially multiple
times for a single transfer, this change introdues a SETUP state that
happens before CONNECT when doing a new transfer.

Now, doing a redirect on a handle goes back to SETUP (not CONNECT like
before) and we initilize the connect timeout etc in SETUP. Previously,
we would do it in CONNECT but that would make it unreliable in cases
where a transfer goes in and out between CONNECT and PENDING multiple
times.

SETUP is transient, so the handle never actually stays in that state.

Additionally: take care of timeouts of PENDING transfers in
curl_multi_perform()

Ref: #13227
Closes #13371
2024-04-15 23:42:06 +02:00
Tal Regev
6eb9e65781
cmake: forward USE_LIBRTMP option to C
Define in C `USE_LIBRTMP` if user requested it from cmake.

Closes #13364
2024-04-15 23:32:23 +02:00
Daniel Stenberg
dde4b3855e
curl_version_info: provide librtmp version
Ref: https://github.com/curl/curl/pull/13364#issuecomment-2054151942
Reported-by: talregev on github
Closes #13368
2024-04-15 16:48:34 +02:00
blankie
e1f1ec028a
docs: clarify CURLOPT_MAXFILESIZE and CURLOPT_MAXFILESIZE_LARGE
The bounds of the size parameter were not specified, and nor was it
specified how to disable the maximum file size check.

The documentation also incorrectly stated that CURLOPT_MAXFILESIZE
always returns CURLE_OK and that CURLOPT_MAXFILESIZE_LARGE only returns
CURLE_OK or CURLE_UNKNOWN_OPTION.

It also did not mention what the default value is, which is zero. This
commit updates the documentation to make note of all these things.

Closes #13372
2024-04-15 13:38:27 +02:00
Patrick Monnerat
5e46c2909f
OS400: post-shellcheck changes adjustments
Build scripts must be executed by the os/400 shell (sh), not bash which
is a PASE program.

Shell function get_make_vars() escaping reworked to match $() subcommand
construct.

Follow-up to 8a622baf9e
Closes #13366
2024-04-15 08:58:13 +00:00
Viktor Szakats
8bac53ecf0
OS400: tidy-up
Drop/fixup mods trying to make some syntax highlighters happier.

Follow-up to 8a622baf9e #13309
Closes #13362
2024-04-15 08:58:09 +00:00
Daniel Stenberg
a1ec035afc
multi: timeout handles even without connection
When there is a "change" in a multi handle and pending handles are moved
back to the main list to be retested if they can proceed further (for
example a previous transfer completed or a connection has a confirmed
multiplexed state), the timeout check in multi_runsingle() would not
trigger because it required an established connection.

This could make a pending tranfer go back to pending state even though
it had been "in progress" for a longer time than permitted. By removing
the requirement for an associated connection, the timeout check will be
done proper even for transfers that has not yet been assigned one.

Ref #13227
Reported-by: Rahul Krishna M
Closes #13276
2024-04-15 09:49:14 +02:00
Patrick Monnerat
6e8a6039b8
mprintf: check fputc error rather than matching returned character
OS/400 ascii fputc wrapper deviates from the posix standard by the
fact that it returns the ebcdic encoding of the original ascii
character. Testing for a matching value for success will then always
fail.

This commit replaces the chariacter comparison by an explicit error
return check.

Follow-up to ef2cf58
Closes #13367
2024-04-15 08:38:14 +02:00
Viktor Szakats
0469c68f49
ci: add CMake build variation, fixup libssh detection in linux-old
To test without c-ares and hit `easy_lock.h` on an old system. Use this
new build step to introduce small variations, and also test libssh2.

Also add workaround to existing job to enable libssh. (CMake's generic
auto-detection doesn't seem to work here.):
```
CMake Warning at CMakeLists.txt:908 (find_package):
  Could not find a package configuration file provided by "libssh" with any
  of the following names:

    libsshConfig.cmake
    libssh-config.cmake
```
Ref: https://github.com/curl/curl/actions/runs/8661316091/job/23750974358#step:5:69

Closes #13361
2024-04-14 02:30:40 +00:00
Viktor Szakats
49f83c30e4
lib: merge ENABLE_QUIC C macro into USE_HTTP3
Before this patch `lib/curl_setup.h` defined these two macros right
next to each other, then the source code used them interchangeably.

After this patch, `USE_HTTP3` guards all HTTP/3 / QUIC features.
(Like `USE_HTTP2` does for HTTP/2.) `ENABLE_QUIC` is no longer used.

This patch doesn't change the way HTTP/3 is enabled via autotools
or CMake. Builders who enabled HTTP/3 manually by defining both of
these macros via `CPPFLAGS` can now delete `-DENABLE_QUIC`.

Closes #13352
2024-04-13 08:33:27 +00:00
Viktor Szakats
e411c98f70
build: prefer USE_IPV6 macro internally (was: ENABLE_IPV6)
Before this patch, two macros were used to guard IPv6 features in curl
sources: `ENABLE_IPV6` and `USE_IPV6`. This patch makes the source use
the latter for consistency with other similar switches.

`-DENABLE_IPV6` remains accepted for compatibility as a synonym for
`-DUSE_IPV6`, when passed to the compiler.

`ENABLE_IPV6` also remains the name of the CMake and `Makefile.vc`
options to control this feature.

Closes #13349
2024-04-13 08:33:26 +00:00
Dan Fandrich
de66e8ad38 DISTROS: mark rolling release distros
These are ones that are unlikely to have back-ported curl patches.

Closes #13353
2024-04-12 11:28:24 -07:00
Daniel Stenberg
68ce971c1d
mbedtls: cut off trailing newlines from debug logs
To avoid double newlines in the output.

Reported-by: Gisle Vanem
Fixes #13321
Closes #13356
2024-04-12 18:27:45 +02:00
Daniel Stenberg
16bad89239
RELEASE-NOTES: synced 2024-04-12 13:25:44 +02:00
Stefan Eissing
8482ce53dd
CURLINFO_REQUEST_SIZE: fixed, add tests for transfer infos reported
- tests for 'size_request' and other stats reported, for
  presence and consistency

Reported-by: Jonatan Vela
Fixes #13269
Closes #13275
2024-04-12 13:20:09 +02:00