Commit Graph

32211 Commits

Author SHA1 Message Date
Abdullah Alyan
f8011ffa1e
tests: enable test 1117 for hyper
Closes #13436
2024-04-22 13:30:14 +02:00
Daniel Stenberg
999bdfc47e
sendf: useless assignment in cr_lc_read()
Spotted by CodeSonar

Closes #13437
2024-04-22 12:58:30 +02:00
Daniel Stenberg
cf337d851a
tool_paramhlp: remove duplicate assign
Spotted by CodeSonar

Closes #13433
2024-04-21 10:51:12 +02:00
Daniel Stenberg
8a5fe04c7b
transfer: remove useless assignment
in Curl_xfer_recv_resp

Spotted by CodeSonar

Closes #13435
2024-04-21 10:50:37 +02:00
Daniel Stenberg
727c946d82
http: acknowledge a returned error code
... and do not overwrite it with a new value that could then hide the
problem.

Spotted by CodeSonar

Closes #13434
2024-04-21 10:49:48 +02:00
Daniel Stenberg
5fa594ab7b
tool_operate: init vars unconditionally in post_per_transfer
In case of (the unlikely) early return, they could otherwise remain
uninitialized

Spotted by CodeSonar

Closes #13430
2024-04-20 22:47:42 +02:00
Daniel Stenberg
d1a8b3519f
RELEASE-NOTES: synced 2024-04-19 23:59:43 +02:00
Daniel Stenberg
fe17c162d0
urlapi: allow setting port number zero
Also set and check errno when strtoul() parsing numbers for better error
checking.

Updated test 1560

Closes #13427
2024-04-19 23:54:21 +02:00
Daniel Stenberg
ac49152e26
http_aws_sigv4: remove useless assignment
This code assigned the variable the same value it already had

Spotted by CodeSonar

Closes #13426
2024-04-19 23:46:54 +02:00
Daniel Stenberg
51a3b9f8b3
file: remove useless assignment
This code assigned the variable the same value it already had.

Spotted by CodeSonar

Closes #13425
2024-04-19 23:46:16 +02:00
Daniel Stenberg
d54b0adbad
test2406: verify -f with HTTP/2 2024-04-19 23:45:16 +02:00
Stefan Eissing
5c59f91427
http2 + ngtcp2: pass CURLcode errors from callbacks
- errors returned by Curl_xfer_write_resp() and the header variant are
  not errors in the protocol. The result needs to be returned on the
  next recv() from the protocol filter.

- make xfer write errors for response data cause the stream to be
  cancelled

- added pytest test_02_14 and test_02_15 to verify that also for
  parallel processing

Reported-by: Laramie Leavitt
Fixes #13411
Closes #13424
2024-04-19 23:45:16 +02:00
Daniel Stenberg
926fb00405
request: make Curl_req_init return void
Since it could not return error and therefore this change removes dead
code for the caller.

Spotted by CodeSonar.

Closes #13423
2024-04-19 23:42:33 +02:00
Daniel Stenberg
25236c6a80
multi: remove the unused Curl_preconnect function
The implementation has been removed, no point in keeping it around.

Follow-up to 476adfeac0

Closes #13422
2024-04-19 15:06:48 +02:00
Daniel Stenberg
fe226af174
Curl_creader_read: init two variables to avoid using them uninited
Spotted by CodeSonar

Closes #13419
2024-04-19 13:35:54 +02:00
Daniel Stenberg
a032e97f2b
http: reject HTTP major version switch mid connection
A connection that has seen an HTTP major version now refuses any other
major HTTP version in future responses. Previously, a HTTP/1.x
connection would just silently accept HTTP/2 or HTTP/3 in the status
lines as long as it had support for those built-in. It would then just
lead to confusion and badness.

Indirectly Spotted by CodeSonar which identified a duplicate assignment
in this function.

Add test 471 to verify

Closes #13421
2024-04-19 13:34:00 +02:00
Daniel Stenberg
123d3ef5db
mqtt: when Curl_xfer_recv returns error, don't use nread
A returned error code makes other return value unreliable, and in this
case potentially uninitialized. On error, do not read other return
values like the nread counter.

Spotted by CodeSonar

Closes #13418
2024-04-19 13:30:09 +02:00
Daniel Stenberg
b2523fc439
ftp: fix socket leak on rare error
In the function AcceptServerConnect() the newly created socket would
leak if Curl_conn_tcp_accepted_set() returns error. Which basically
should never happen.

Spotted by CodeSonar.

Closes #13417
2024-04-19 11:10:50 +02:00
Daniel Stenberg
0a25b3e014
urlapi: remove unused flags argument from Curl_url_set_authority
The function is only called from a single place (for HTTP/2 server push)
so might as well just assume this fixed option every time.

Closes #13409
2024-04-18 22:24:33 +02:00
Daniel Stenberg
89ce720028
github/ISSUE_TEMPLATE: tweak the commericual support text 2024-04-18 17:00:57 +02:00
Daniel Stenberg
2011e49347
github/ISSUE_TEMPLATE: link the GitHub discussions too
... and move the feature request line to the bottom.
2024-04-18 16:59:21 +02:00
Daniel Stenberg
229c144fe8
curl_url_get.md: clarify queries and fragments and CURLU_GET_EMPTY
Follow-up to 3eac21d86b

Closes #13407
2024-04-18 16:13:34 +02:00
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