Commit Graph

7113 Commits

Author SHA1 Message Date
Daniel Stenberg
33e7745eef
RELEASE-NOTES: synced
bumped to 8.17.1 for now

fixed typo in THANKS-filter
2025-11-05 14:12:23 +01:00
Daniel Stenberg
6687379389
VERSIONS: 8.18.0 is now pending 2025-11-05 08:00:05 +01:00
Daniel Stenberg
7872ec968f
THANKS: add contributors from 8.17.0 2025-11-05 07:57:28 +01:00
Daniel Stenberg
775add6e90
HISTORY: extend
With recent events and some more in the past

Closes #19361
2025-11-04 16:25:28 +01:00
Samuel Henrique
913c1f28c9
wcurl: import v2025.11.04
Closes #19353
2025-11-04 14:15:46 +01:00
Daniel Stenberg
70a11c6f06
CURLOPT_COPYPOSTFIELDS.md: used with MQTT and RTSP as well
Follow-up to 5ec87346a9

Closes #19351
2025-11-04 09:08:16 +01:00
Daniel Stenberg
f8e7b1377b
BINDINGS: change dead link to archive.org version
The Hollywood binding host name www.hollywood-mal.com does not seem to
work anymore.

Closes #19352
2025-11-04 09:07:41 +01:00
Daniel Stenberg
5ec87346a9
CURLOPT_POSTFIELDSIZE*: these also work for MQTT and RTSP
Closes #19346
2025-11-03 22:29:28 +01:00
Viktor Szakats
63e9721b63
tests: avoid hard-coded CRLFs in more sections
- `reply/data*`, `verify/stdout`, `verify/stderr`, `verify/file*`,
  `verify/proxy`:
  - make `crlf="yes"` force CRLF to all lines, instead of just applying
    to HTTP protocol headers.
  - add support for `crlf="headers"` that only converts HTTP protocol
    header lines to CRLF. (previously done via `crlf="yes"`.)
  - use `crlf="headers"` where possible.

- `reply/connect*`:
  - add support for `crlf="yes"` and `crlf="headers"`.
  - use them where possible.

- `client/file*`, `client/stdin`:
  - add support for `crlf="yes"`.
  - use it where possible.

- `reply/data*`, `verify/protocol`:
  - replace existing uses of `crlf="yes"` with `crlf="headers`" where it
    does not change the result.

Reducing the number of `tests/data/test*`:
- CRLF newlines from 10295 to 1985. (119985 lines total)
- files with mixed newlines from 656 to 113. (1890 files total)

After this patch there remain 141 sections with mixed newlines, where
the mixing is not split between headers/non-headers. There is no obvious
pattern here. Some of the CRLF uses might be accidental, or
non-significant. They will be tackled in a future patch.

Follow-up to 6cf3d7b1b1 #19318
Follow-up to 4d2a05d3fe #19284

Closes #19313
2025-11-03 21:15:12 +01:00
Viktor Szakats
6cf3d7b1b1
tests: avoid more hard-coded CRLFs in protocol sections
- fix regex to not catch CR (from CRLF), in `PORT`, `EPRT`
  commands, allowing to use `crlf="yes"` more.
- add `crlf="headers"` mode for `protocol` sections.
  To call `subnewlines()` without its force option.
  This is the mode used in `data` sections when `crlf="yes"`.
  (This confusion may be subject to a future commit.)
- subnewlines: apply CRLF to `HEAD` and `CONNECT` HTTP requests.
- subnewlines: apply CRLF to RTSP requests.
- delete remaining empty `protocol` sections.

Reducing the number of `tests/data/test*`:
- CRLF newlines from 11325 to 10295. (119984 lines total)
- files with mixed newlines from 707 to 656. (1890 files total)

Follow-up to 4d2a05d3fe #19284

Closes #19318
2025-11-01 23:52:55 +01:00
Viktor Szakats
d29f14b9cf
tests: replace significant invisible spaces with macros
To make them explicit, visible, avoid being accidentally trimmed.
Also prevents Git warnings, e.g. on `git am`.

Also:
- runtests: add support for `%spc%` and `%tab%` macros.
- test59: delete non-significant line-ending space.
- spacecheck.pl: drop line-ending whitespace exception for tests.

Closes #19300
2025-10-31 17:15:33 +01:00
Daniel Stenberg
928363f28c
examples: consistent variable naming across examples
- 'CURL *' handles are called 'curl'
- 'CURLM *' handles are called 'multi'
- write callbacks are called 'write_cb'
- read callbacs are called 'read_cb'
- CURLcode variables are called 'res'

It makes the examples look and feel more consistent. It allows for
easier copy and pasting between examples.

Closes #19299
2025-10-31 16:44:57 +01:00
Viktor Szakats
c887a3f2f2
BINDINGS.md: point flaky URL to archive.org
To avoid linkcheck CI fails. It was failing regularly in the last months.
2025-10-31 16:21:41 +01:00
Viktor Szakats
869143b194
examples: fix more potential resource leaks, and more
Also:
- delete dead code.
- sync `http2-download.c` and `http2-upload.c` sources.
- simplessl: fix constant expression.
- simplessl: avoid `expression is constant` VS2010 warning, drop pragma.
- replace large stack buffers with dynamic allocation.
- http2-download: fix to fill transfer number.

Some of these were pointed out by TIOBE scanner via Coverity 2025.3.0.

Closes #19292
2025-10-31 13:35:53 +01:00
Viktor Szakats
4b85e489a4
examples/http2-serverpush: fix file handle leaks
Also:
- tests/libtest/cli_h2_serverpush: re-sync formatting.

Previously fixed in tests based on a local clang-tidy v20 report.

Pointed out by TIOBE scanner via Coverity 2025.3.0.
Follow-up to 83a8818cfe #17706

Closes #19291
2025-10-31 13:14:12 +01:00
Daniel Stenberg
73811b4c51
header: see-also --proxy-header and vice versa
Closes #19259
2025-10-27 17:24:18 +01:00
Daniel Stenberg
05eea37e78
CURLOPT_SERVER_RESPONSE_TIMEOUT*: add default and see-also
Also move the old name mention to a HISTORY section

Closes #19258
2025-10-27 17:23:17 +01:00
Viktor Szakats
18119eb916
ECH.md: make OpenSSL branch clone instructions work
Closes #19237
2025-10-26 01:19:12 +02:00
Viktor Szakats
71d1eec675
tidy-up: miscellaneous
- cmake/Find*: make double quotes consistent.
- drop redundant parenthesis.
- GHA/checksrc: sync a step name with others.
- whitespace.

Closes #19233
2025-10-25 00:19:00 +02:00
Viktor Szakats
4a6fbd5e1d
NTLM: disable if DES support missing from OpenSSL or mbedTLS
Make autotools and cmake detect DES support in OpenSSL and mbedTLS.
Forward feature macros to C and omit NTLM from the feature preview list.
Use the feature macros in source. This ensure that `-V` output matches
the preview.

OpenSSL doesn't support DES when built with `no-des` or `no-deprecated`.
mbedTLS 4.x no longer supports it, and it's possible to disable it in
<4 with `scripts/config.py unset MBEDTLS_DES_C`.

Before this patch this worked for
mbedTLS 4 only, and with a regression for pending PR #16973.

Also:

- drop NTLM feature check from `curl_setup.h` in favour of autotools/
  cmake feature macros. This makes `curl_setup.h` no longer need
  to include an mbedTLS header, which in turn makes tests/server build
  without depending on mbedTLS.
  Fixing, in #16973:
  ```
  In file included from tests/server/first.h:40,
                   from bld/tests/server/servers.c:3:
  lib/curl_setup.h:741:10: fatal error: mbedtls/version.h: No such file or directory
    741 | #include <mbedtls/version.h>
        |          ^~~~~~~~~~~~~~~~~~~
  ```
  Ref: https://github.com/curl/curl/actions/runs/18689537893/job/53291322012?pr=16973
  Ref: #19181 (initial fix idea)
  Follow-up to 3a305831d1 #19077

- move back mbedTLS header include and version check from
  `curl_setup.h` to each source which consumes mbedTLS.

- GHA/http3-linux: drop workaround that disabled NTLM for
  `no-deprecated` OpenSSL builds.
  Follow-up to 006977859d #12384

- curl_ntlm_core: drop pointless macro `CURL_NTLM_NOT_SUPPORTED`.
  Follow-up to 006977859d #12384

Closes #19206
2025-10-24 12:12:20 +02:00
Daniel Stenberg
ab590ba62f
TODO: a fixed FTP directory listing format
Closes #19212
2025-10-24 11:21:48 +02:00
Viktor Szakats
ea6455b7a4
spelling: subdirectories
Closes #19180
2025-10-21 17:18:35 +02:00
Viktor Szakats
09f857803f
INSTALL-CMAKE.md: add manual configuration examples
Closes #19179
2025-10-21 17:18:34 +02:00
Viktor Szakats
38c19edd67
cmake: say 'absolute path' in option descriptions and docs
To not have to guess. Also to sync with autotools, which already uses
this wording.

Also:
- replace the stray term 'folder' with 'directory' for consistency.
- store help text in a temp variable to avoid overly long strings
  (mandatory in CMake <4.2.0 and can't be trivially split), also
  to avoid repeating this string 4 times.

Ref: https://cmake.org/cmake/help/v4.2/command/set.html

Closes #19169
2025-10-21 15:07:36 +02:00
Viktor Szakats
1966c86d71
cmake: add and use local FindGnuTLS module
Replacing a combination of custom logic in the main script and relying
on CMake's built-in Find module, with code and behavior used for
the rest of dependencies.

Also to:
- add version detection in the non-pkg-config path.
- make `GNUTLS_INCLUDE_DIR` and `GNUTLS_LIBRARY` take precedence over
  pkg-config. As with other dependencies.
- document the above two configuration options.
- prepare for #16973, which originally introduced this local Find
  module.

The local module is doing largely the same as CMake's built-in
FindGnuTLS. Differences:
- honors `CURL_USE_PKGCONFIG`.
- returns GnuTLS version for non-pkg-config detection.
- consistently returns `GNUTLS_VERSION`.
  (CMake's built-in uses s different name in <3.16.)
- CMake 3.16+ returns an imported target. curl supports 3.7,
  therefore we may only use it conditionally, which isn't worth it.

Cherry-picked from #16973

Closes #19163
2025-10-21 14:37:40 +02:00
Viktor Szakats
1afdb65b55
INSTALL-CMAKE.md: fix descriptions for LDAP dependency options
After introducing the local FindLDAP module, these options work the same
way as with other dependencies.

Follow-up to 49f2a23d50 #15273

Closes #19170
2025-10-21 01:08:05 +02:00
Viktor Szakats
a041bf6ca2
Makefile.example: make default options more likely to work
- replace default libpaths with more common ones.
- drop Solaris network libs.

Closes #19161
2025-10-20 13:52:58 +02:00
Viktor Szakats
97dd1da8d0
Makefile.example: bump default example from FTP to HTTPS
To have a chance to work out of the box, securely. (assuming a TLS
backend with CA certs setup.)

Closes #19160
2025-10-20 13:22:17 +02:00
Daniel Stenberg
d2af9c9a08
INSTALL.md: add another OS (Azure Sphere)
Closes #19155
2025-10-20 10:32:08 +02:00
Daniel Stenberg
f21d70e76c
HTTP3: clarify the status for "old" OpenSSL, not current
Closes #19153
2025-10-20 09:07:12 +02:00
Daniel Stenberg
0bb25cdbb7
curl_easy_setopt.md: add missing CURLOPT_POSTFIELDS
It was mistakenly removed in 8dab7465a5 (shipped in 8.9.0)

Also fix test 1139 which should have detected this but didn't due to a
bad regex check.

Reported-by: Jonathan Cardoso
Fixes #19151
Closes #119152
2025-10-20 08:50:02 +02:00
Viktor Szakats
f6334f379d
examples: replace casts with curl_off_t printf masks
Follow-up to e4ec666a3d #19112

Closes #19133
2025-10-19 13:16:32 +02:00
JimFuller-RedHat
e4ec666a3d
examples/chkspeed: portable printing when outputting curl_off_t values
Closes #19112
2025-10-18 23:26:15 +02:00
Daniel Stenberg
480ff0cf58
INSTALL: update the list of known operating systems
curl has run on

Closes #19106
2025-10-17 22:19:38 +02:00
Daniel Stenberg
25eb34dd3e
KNOWN_BUGS: SOCKS-SSPI discards the security context
Also make the verbose log say it

Pointed out by ZeroPath

Closes #19103
2025-10-17 17:45:06 +02:00
Daniel Stenberg
f5f4710a26
examples/websocket: fix use of uninitialized rlen
Pointed out by ZeroPath

Closes #19088
2025-10-17 10:15:07 +02:00
Stefan Eissing
c37ed9a11e
apple sectrust: add to features
It should be visible in the feature list that libcurl is build with
Apple SecTrust enabled.

Closes #19057
2025-10-16 10:58:45 +02:00
Daniel Stenberg
be852e39b2
tftp: check for trailing ";mode=" in URL without strstr
RFC 3617 defines two specific modes, "netascii" and "octet". This code
now checks only for those trailing ones - and not in the hostname since
they can't be there anymore.

Assisted-by: Jay Satiro
Closes #19070
2025-10-15 09:59:57 +02:00
Jay Satiro
fe06127ded tool_operate: retry on HTTP response codes 522 and 524
- Treat HTTP response codes 522 and 524 as a transient error since
  Cloudflare may use them instead of 504 to signal timeout.

For example here is a 522 error message from Cloudflare:

"The initial connection between Cloudflare's network and the origin web
server timed out. As a result, the web page can not be displayed."

Prior to this change the curl tool did not retry on HTTP response codes
522 and 524 when --retry was used.

Fixes https://github.com/curl/curl/discussions/16143
Closes https://github.com/curl/curl/pull/19011
2025-10-14 11:06:24 -04:00
Viktor Szakats
64ed2ea196
examples: check more errors, fix cleanups, scope variables
Inspired by Joshua's report on examples.

Closes #19055
2025-10-14 16:33:00 +02:00
Stefan Eissing
1ea99afdc7
scorecard: add perf support on linux
When calling scorecard with --flame to produce a flamegraph, use
"perf" on linux platforms to do the measurements. Update the scorecard
documentation about it.

Closes #19058
2025-10-14 16:24:35 +02:00
Viktor Szakats
4c7507daf9
examples: improve global init, error checks and returning errors
- add `curl_global_init()` and `curl_global_cleanup()` where missing.
- check the result of `curl_global_init()` where missing.
- return the last curl error from `main()`.
- drop Win32-specific socket initialization in favor of `curl_global_init()`.
- rename some outliers to `res` for curl result code.
- fix cleanup in some error cases.

Inspired by Joshua's report on examples.

Closes #19053
2025-10-13 23:02:05 +02:00
Viktor Szakats
3049c8e0a0
examples: return curl_easy_perform() results
Where missing. Or explicitly `(void)` it where we ignore it on purpose.

Reported-by: Joshua Rogers (for `sepheaders.c`)

Closes #19052
2025-10-13 17:58:30 +02:00
Viktor Szakats
5cf0a6789d
examples: call curl_global_cleanup() where missing
Reported-by: Joshua Rogers (for `sepheaders.c`)

Closes #19051
2025-10-13 17:52:06 +02:00
Viktor Szakats
5e74b2df34
REUSE: move copyright headers to .checksrc
To make it simpler to move them around, create and delete them without
syncing with `REUSE.toml`.

Also:
- checksrc: allow empty lines in `.checksrc`.
- comment on why curl printfs are disallowed in examples.

Closes #19024
2025-10-13 11:54:22 +02:00
Daniel Stenberg
cde85412d0
KNOWN_BUGS: We do not support auth-int for Digest using PUT or POST
Closes #19038
2025-10-13 08:55:32 +02:00
Daniel Stenberg
1feeda422e
examples/synctime: fix null termination assumptions
bonus: dont parse argv[0] for options

Reported-by: Joshua Rogers
Closes #19032
2025-10-12 15:35:57 +02:00
Daniel Stenberg
2b49d17cba
docs: expand on quoting rules for file names in SFTP quote
Reported-by: Harry Sintonen
Closes #19025
2025-10-12 15:33:21 +02:00
Viktor Szakats
b419f1fd87
examples/log_failed_transfers: make it build for WinCE
- include `windows.h` after `winsock2.h` via `curl/curl.h`.
- avoid `errno` for WinCE.
- avoid `_vscprintf` for WinCE.

Ref: 4535532ed3 #18843
Follow-up to 0780de2625 #18668
Closes #19016
2025-10-11 01:04:24 +02:00
Stefan Eissing
9d7b532404
cf-socket: set FD_CLOEXEC on all sockets opened
Removed TODO item

Reported-by: Joshua Rogers
Closes #18968
2025-10-10 23:44:43 +02:00