Commit Graph

2510 Commits

Author SHA1 Message Date
Daniel Stenberg
58394b1c8c
docs: use .example URLs for proxies 2025-12-05 23:41:41 +01:00
Daniel Stenberg
a1531261b1
CURLMOPT_SOCKETFUNCTION.md: fix the callback argument use
The example code does not use curl_multi_assign(), but its callback
function used socketp (called sockp in the function) to get the struct
priv pointer instead of the correct clientp (cbp).

Reported-by: Greg Hudson
Fixes #19840
Closes #19841
2025-12-04 22:59:51 +01:00
Viktor Szakats
ebe6fa08c9
docs/libcurl: fix C formatting nits
Closes #19844
2025-12-04 22:49:03 +01:00
Daniel Stenberg
e8a4068e68
docs: clarify how to do unix domain sockets with SOCKS proxy
Ref: #19825
Closes #19829
2025-12-04 11:13:16 +01:00
Stefan Eissing
9cf4a400d2
pytest: improve stragglers
A fix for the tests that took the longest:
- test_05: make the server close the HTTP/1.1 connection when
  simulating an error during a download. This eliminates waiting
  for a keepalive timeout
- test_02: pause tests with slightly smaller documents, eliminate
  special setup for HTTP/2. We test stream window handling now
  elsewhere already
- cli_hx_download: run look in 500ms steps instead of 1sec, resuming
  paused tranfers earlier.

Closes #19809
2025-12-02 17:04:20 +01:00
Stefan Eissing
12a3182fc3
ssh: tracing and better pollset handling
Remove connection member `waitfor` and keep it in the SSH connection
meta. Add `ssh` to supported tracing features, convert many DEBUGF
printgs to traces.

Closes #19745
2025-11-28 16:05:43 +01:00
Stefan Eissing
c4f29cc508
ip_quadruple/proxy: make port uint16_t
Make `port` member in these struct of type `uint16_t`.

add `uint8_t transport` to `struct ip_quadruple

Define TRNSPRT_NONE as 0. By assigning a valid transport only on a
successful connection, it is clear when the ip_quadruple members are
valid. Also, for transports not involving ports, the getinfos for
`CURLINFO_PRIMARY_PORT` and `CURLINFO_LOCAL_PORT` will now always return
-1.

Make all `transport` members and parameters of type `uint8_t`.

Document the return value of `CURLINFO_LOCAL_PORT` and
`CURLINFO_PRIMARY_PORT` in this regard. Add tests that writeout stats
report ports correctly.

Closes #19708
2025-11-27 14:32:01 +01:00
Yedaya Katsman
9ea6f2bc69
docs: add rustls to supported backends for CERT and KEY
Followup to 1c8c93ae15

Closes #19709
2025-11-27 08:38:25 +01:00
Daniel Stenberg
ea7df8d076
docs: spell it Rustls with a capital R
I believe this is how the project itself uses it.

Closes #19702
2025-11-26 09:41:09 +01:00
Patrick Monnerat
92e6782d1f
doc: some returned in-memory data may not be altered
Some public prototypes do not declare return values or out parameters as
const where they should be. Avoid changing the public interface, but
document those values as read-only.

Closes #19692
2025-11-25 11:05:27 +01:00
Marc Aldorasi
529f61388f
gnutls: implement CURLOPT_CAINFO_BLOB
This adds support for in-memory CA certs using CURLOPT_CAINFO_BLOB to
the GnuTLS backend.

Closes #19612
2025-11-21 08:55:44 +01:00
Viktor Szakats
7e8f36bf8e
cmake: honor CURL_DISABLE_INSTALL and CURL_ENABLE_EXPORT_TARGET in lib and src
Based on existing code and commit history it appears
`CURL_DISABLE_INSTALL` means to prevent calling `install()`;
`CURL_ENABLE_EXPORT_TARGET` means to prevent calling `export()` and
`install()`s with `EXPORT` in them.

Fix them to also apply to the lib and src directories in that vain:
- lib: honor `CURL_DISABLE_INSTALL`
- src: honor `CURL_DISABLE_INSTALL`
- src: honor `CURL_ENABLE_EXPORT_TARGET`

https://cmake.org/cmake/help/v4.2/command/install.html
https://cmake.org/cmake/help/v4.2/command/export.html

- `CURL_DISABLE_INSTALL` follow-up to:
  aace27b096 #12287
- `CURL_ENABLE_EXPORT_TARGET` follow-up to:
  8698825106 #9638
  643ec29645 #7060

Closes #19144
2025-11-20 00:23:08 +01:00
Viktor Szakats
1e1ec7f6c2
badwords: add more contractions, fix fallouts
Also fix hits in autotools scripts (not to enforce).

Closes #19576
2025-11-17 19:29:15 +01:00
Viktor Szakats
231e8a71e1
docs: fix checksrc warning, fix checkdocs CI filter
Also:
- GHA/checkdocs: fix CI filters to catch it early.
  Follow-up to 28dd14aafe #15797

Closes #19533
2025-11-14 17:32:04 +01:00
Daniel Stenberg
7e0d4dd4a8
CURLOPT_SSH_KEYFUNCTION.md: fix minor indent mistake in example 2025-11-08 17:49:30 +01:00
Daniel Stenberg
64489bc3be
CURLOPT_READFUNCTION.md: clarify the size of the buffer
No need to multiply with size as size is always 1 - and documented so.

Closes #19402
2025-11-08 17:11:28 +01:00
Daniel Stenberg
d083f529e8
CURLINFO_SCHEME/PROTOCOL: they return the "scheme" for a "transfer"
Not protocol. Not for connection.

Closes #19403
2025-11-08 17:09:50 +01:00
Daniel Stenberg
a5c0dfc19f
CURLINFO_TLS_SSL_PTR.md: remove CURLINFO_TLS_SESSION text
That option is properly documented in its own page.

Closes #19404
2025-11-08 17:07:23 +01:00
Daniel Stenberg
8442c24c9a
CURLINFO: remove 'get' and 'get the' from each short desc
The short descriptions describe the data each info retrieves. The info
itself does not 'get' the data.

This simplifies and shortens the descriptions and make them more
consistent.

Closes #19406
2025-11-08 17:05:55 +01:00
Daniel Stenberg
d8bad9926c
docs: mention umask need when curl creates files
for cookies, alt-svc and HSTS, command line and library

Closes #19396
2025-11-07 14:12:59 +01:00
Viktor Szakats
58023ba522
docs: fix checksrc EQUALSPACE warnings
```
docs/libcurl/opts/CURLOPT_SSL_CTX_DATA.md:86:16
docs/libcurl/opts/CURLOPT_SSL_CTX_FUNCTION.md:139:16
```

Also sync `CURL *` and result variable names with rest of docs.

Follow-up to 6d7e924e80 #19375

Closes #19379
2025-11-06 00:04:15 +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
5ec87346a9
CURLOPT_POSTFIELDSIZE*: these also work for MQTT and RTSP
Closes #19346
2025-11-03 22:29:28 +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
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
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
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
Daniel Stenberg
e4645c86b5
CURLOPT_COOKIEFILE.md: clarify when the cookies are loaded
Closes #18924
2025-10-08 23:19:34 +02:00
Viktor Szakats
9f52458e7d
notify: use 'notify' in public header and docs
Closes #18915
2025-10-07 19:11:31 +02:00
Daniel Stenberg
352d1dc6ab
CURLMOPT_NOTIFYFUNCTION.md: minor language polish
- mention the possibility of new types in the future
- s/a an/an

Closes #18913
2025-10-07 17:20:05 +02:00
Daniel Stenberg
496802fdcf
multi: use CURLMNOTIFY_ as notification id prefix
Since CURLM_ is already used as prefix for multi error codes, it makes
it easier to detect and understand the difference between identifiers -
and allows for scripts on the website and elsewhere to separate them
properly.

Follow-up to 53be8166b2
Closes #18912
2025-10-07 17:18:05 +02:00
Stefan Eissing
53be8166b2
multi: notify rename, remove the last stragglers
in the public API.

Follow-up to 357808f4ad

Closes #18910
2025-10-07 14:54:49 +02:00
Stefan Eissing
357808f4ad
multi: add notifications API
Add infrastructure to colled and dispatch notifications for transfers
and the multi handle in general. Applications can register a callback
and en-/disable notification type the are interested in.

Without a callback installed, notifications are not collected. Same when
a notification type has not been enabled.

Memory allocation failures on adding notifications lead to a general
multi failure state and result in CURLM_OUT_OF_MEMORY returned from
curl_multi_perform() and curl_multi_socket*() invocations.

Closes #18432
2025-10-07 10:55:31 +02:00
Daniel Stenberg
66f4c5699e
test766: verify CURLOPT_SOCKOPTFUNCTION error on accept
This test does active FTP with a socketopt callback that returns error
for the CURLSOCKTYPE_ACCEPT "purpose" to make sure we test and exercise
this error path - without leaks.

Closes #18879
2025-10-06 23:16:04 +02:00
Stefan Eissing
b022389757
ip-happy: do not set unnecessary timeout
When attempts on all addresses have been started, do no longer set any
EXPIRE_HAPPY_EYEBALLS timeouts.

Fixes #18767
Reported-by: Johannes Schindelin
Closes #18768
2025-10-01 08:01:47 +02:00
Viktor Szakats
95e50ad694
tidy-up: miscellaneous
- GHA/checkdocs: rename `spellcheck` job to `pyspelling` to say
  the exact tool used.
- GHA/checkdocs: restore a comment.
- GHA/linux: add `-B .` to a cmake configure to avoid warning, and
  future breakage.
- autotools: use correct casing for `Schannel`.
- doh: update RFC URL.
- drop redundant parenthesis.
- fix indentation, whitespace.

Closes #18756
2025-09-27 12:59:07 +02:00
Stefan Eissing
061e265502
http: handle user-defined connection headers
When there is more than one user-supplied 'Connection: ' header, add
values that curl needs internally to the first one and emit all
subsequent ones thereafter.

Fixes #18662
Reported-by: Evgeny Grin (Karlson2k)
Closes #18686
2025-09-26 09:27:50 +02:00
Daniel Stenberg
5ab120bc4e
krb5: drop support for Kerberos FTP
It was accidentally broken in commit 0f4c439fc7, shipped since
8.8.0 (May 2024) and yet not a single person has noticed or reported,
indicating that we might as well drop support for FTP Kerberos.

Krb5 support was added in 54967d2a3a (July 2007), and we have
been carrying the extra license information around since then for this
code. This commit removes the last traces of that code and thus we can
remove the extra copyright notices along with it.

Reported-by: Joshua Rogers
Closes #18577
2025-09-20 23:58:28 +02:00
Daniel Stenberg
82eeda1041
CURLOPT_HEADER/WRITEFUNCTION.md: drop '* size' since size is always 1
Closes #18640
2025-09-20 17:27:17 +02:00
Daniel Stenberg
7a26304a95
curl_slist_append.md: clarify that a NULL pointer is not acceptable
Closes #18627
2025-09-20 12:04:47 +02:00
Christian Schmitz
0f067ba4aa
libcurl-multi.md: added curl_multi_get_offt mention
The multi interface page didn't mention the new curl_multi_get_offt
function.

Closes #18579
2025-09-17 23:11:38 +02:00
Daniel Stenberg
3053a3e90f
docs/libcurl: use lowercase must
To shout less. Use bold in some places.

Closes #18570
2025-09-16 17:12:26 +02:00
Daniel Stenberg
cdb56c6666
docs/libcurl: clarify some timeout option behavior
Closes #18569
2025-09-16 16:57:28 +02:00
Viktor Szakats
619307feb0
cmake: fix building docs when the base directory contains .3
Fixing:
```
ninja: error: '<...>/basedir.md/_bld/docs/libcurl/libcurl-symbols.md',
  needed by 'docs/libcurl/curl_easy_cleanup.3', missing and no known rule to make it
```

Reported-by: Nir Azkiel
Fixes #18560
Follow-up to 898b012a9b #1288
Closes #18563
2025-09-16 12:37:11 +02:00
Daniel Stenberg
61b79dee79
CURLOPT_TIMECONDITION.md: works for FILE and FTP as well
Closes #18551
2025-09-15 13:58:11 +02:00
Stefan Eissing
de3fc1d7ad
asyn-thrdd: drop pthread_cancel
Remove use of pthread_cancel in asnyc threaded resolving. While there
are system where this works, others might leak to resource leakage
(memory, files, etc.). The popular nsswitch is one example where resolve
code can be dragged in that is not prepared.

The overall promise and mechanism of pthread_cancel() is just too
brittle and the historcal design of getaddrinfo() continues to haunt us.

Fixes #18532
Reported-by: Javier Blazquez
Closes #18540
2025-09-15 09:25:43 +02:00
Daniel Stenberg
58bdfb4e1d
CURLOPT_SSL_VERIFYHOST.md: add see-also to two other VERIFYHOST options
Closes #18548
2025-09-14 23:53:40 +02:00
Dan Fandrich
bbdb869ec7 libcurl-security.md: mention long-running connections
Some applications may want to periodically recheck the remote server
certificate, which doesn't happen on a long-running connection.

Ref: #18527
Closes #18533
2025-09-12 00:20:19 -07:00
Daniel Stenberg
d7d32ad9b9
docs/libcurl: remove ancient version references
To make the texts easier on the eye.

- Remove most free text references to curl versions before 7.60.0 (May
  2018)
- Leave those present in a HISTORY section

Most of them are already documented in symbols-in-versions anyway.

Closes #18530
2025-09-12 08:27:38 +02:00
Daniel Stenberg
57b195bf51
CURLINFO_FTP_ENTRY_PATH.md: this is for SFTP as well
Closes #18531
2025-09-12 08:26:45 +02:00