Commit graph

7529 commits

Author SHA1 Message Date
Daniel Stenberg
b7c9229cc6
CURLINFO_CONTENT_LENGTH_UPLOAD_T.md: expand
Fixes #21953
Reported-by: BazaarAcc32 on github
Closes #21956
2026-06-11 10:11:50 +02:00
Daniel Stenberg
9d93d4abe1
SECURITY-ADVISORY.md: expand
Fill in missing information and rephrase a little

Closes #21964
2026-06-11 10:09:06 +02:00
Daniel Stenberg
74096802ee
CURLOPT_WRITEFUNCTION.md: mention redirects
Reported-by: BazaarAcc32 on github
Fixes #21945
Closes #21950
2026-06-10 23:31:30 +02:00
Viktor Szakats
97aed9c960
tidy-up: drop stray comparisons with literal zero
Drop from:
- strcmp, strcmpi, strncmp, memcmp, lstat, getrlimit, setrlimit, fseek,
  fstat
- autotools detection snippets.
- smooth-gtk-thread: simplify `!var != 0` expression.

Closes #21947
2026-06-10 15:15:54 +02:00
Viktor Szakats
2f3fa479dd
build: enable -Wformat-signedness, fix issues found
Adjust code to avoid `-Wformat-signedness` warnings, while making sure
that enums are always cast to a known type when passing them to `printf`
functions, to support compilers and compiler settings where enums are
not default-size signed ints.

- cast integers printed as hex to `unsigned`. (63 times, 20 of them in
  `mbedtls.c`)
- cast misc enums to `int` for printing. (31 times)
- cast `CURL_LOCK_DATA_*` enums to `int`. (4 times)
- cast `CURL_FORMADD_*` enums to `int`. (13 times)
- cast `CURLSHE_*` enums to `int`. (3 times)
- cast `CURLUE_*` enums to `int`. (33 times)
- cast `CURLMSG_*` enums to `int`. (6 times)
- cast `CURLE_*` enums to `int`. (~380 times)
- unit1675: fix mask.
  Follow-up to 7c34365cce #21879

Ref: #18343 (initial attempt)

Closes #20848
2026-06-10 15:14:08 +02:00
A Johnston
084ceb6601
hsts: duplicate live HSTS data in curl_easy_duphandle
Verified by test 1922

Closes #21809
2026-06-09 16:51:47 +02:00
Viktor Szakats
014be82a66
tidy-up: drop redundant == NULL syntax
Where missed by checksrc.

Closes #21935
2026-06-09 14:37:36 +02:00
Viktor Szakats
59213abfb2
tidy-up: drop redundant != NULL syntax
Where missed by checksrc.

Closes #21932
2026-06-09 14:37:36 +02:00
Viktor Szakats
e37417e021
psl: require libpsl 0.16.0 (2016-12-10) or greater
Debian Stretch offers 0.17.0.

Ref: https://github.com/rockdaboot/libpsl/releases/tag/libpsl-0.16.0
Ref: https://sources.debian.org/src/libpsl/

Closes #21933
2026-06-09 14:34:57 +02:00
Viktor Szakats
952b04474c
tidy-up: miscellaneous
- badwords: replace stray synonyms with 'null-terminator'.
- tests/FILEFORMAT.md: tidy up feature descriptions.
- printf: replace stray `%i` masks with `%d` for consistency.
- pytest: add comments for empty excepts to try silencing GitHub CodeQL
  warnings.
- tool1394, unit1675: merge nested `if`s.
- dnscache: fix typo in comment.
- fix whitespace, indent and newlines.

Closes #21921
2026-06-09 11:07:55 +02:00
Viktor Szakats
b9b2c0cbb8
docs: returned header size reflects HTTP/1-style format
Ref: #21889

Closes #21912
2026-06-09 10:24:07 +02:00
Daniel Stenberg
e786a4e915
CURLOPT_DOH_URL.md: does not inherit proxy options
Closes #21904
2026-06-08 13:30:39 +02:00
Daniel Stenberg
ff7086874e
_ENVIRONMENT.md. Windows does case insensitive env variables
Closes #21907
2026-06-08 13:29:47 +02:00
Viktor Szakats
cdce2460b3
runtests: allow skipping tests on torture, use for test 357
Some tests may take a long time in torture mode. Make it possible
to skip individual tests when runtests in running in torture mode.

Also:
- skip test 357 for the reason above.
  Saved 1-3 minutes for the Linux CI torture job, 1-1.5m on Windows.
  No savings on macOS.

Reported-by: Stefan Eissing
Fixes #21873

Closes #21906
2026-06-08 13:26:31 +02:00
Daniel Stenberg
e2cb3cc78e
CURLOPT_DISALLOW_USERNAME_IN_URL: is for CURLOPT_URL only
Closes #21890
2026-06-07 23:09:56 +02:00
Daniel Stenberg
7bb7b2c2a4
tool: warn when --ssl and --ftp-ssl-control override each other
and mention this properly in the docs.

Closes #21887
2026-06-07 14:42:13 +02:00
Daniel Stenberg
c4c12843df
CURLOPT_PORT.md: use stronger language
This option should not be used.

Closes #21886
2026-06-07 14:41:04 +02:00
Daniel Stenberg
38b72f3b56
CURLOPT_PINNEDPUBLICKEY.md: does not apply for other origins
Clarify

Closes #21885
2026-06-07 00:12:02 +02:00
Daniel Stenberg
f7f1666ee2
CURLOPT_CHUNK_BGN_FUNCTION: target is there for symlinks only
Closes #21883
2026-06-07 00:11:14 +02:00
Viktor Szakats
d3e9a815c4
tidy-up: miscellaneous
- fix typos.
- badword: add two new words.
- cpp: drop parentheses from standalone `#if` expressions.
- libssh: vertical-align comment block with others.
- clang-format.

Closes #21880
2026-06-05 16:57:38 +02:00
Viktor Szakats
1b8f4dba28
tidy-up: drop stray casts for allocated pointers
Closes #21865
2026-06-05 12:24:01 +02:00
Daniel Stenberg
c32427d0c1
VULN-DISCLOSURE-POLICY.md: emphasize comm as a human
Closes #21870
2026-06-05 09:13:35 +02:00
Andreas Falkenhahn
3d721a1d41 BINDINGS: Update Hollywood link
- Change link from archive.org back to hollywood-mal.com since the site
  is up and running.

Closes https://github.com/curl/curl/pull/21862
2026-06-04 14:45:17 -04:00
Daniel Stenberg
5d178de986
hsts.md: mention multiple curl invokes effect
Reported-by: zhanhb on github
Ref: #21847
Closes #21851
2026-06-02 22:46:03 +02:00
Viktor Szakats
89683e05b9
tidy-up: use test/example domains more
Closes #21849
2026-06-02 15:31:48 +02:00
Daniel Stenberg
d2f8e231a7
KNOWN_BUGS: Digest does not care for 'domain'
Room for improvement.

Closes #21838
2026-06-02 11:17:48 +02:00
Daniel Stenberg
277db5490c
URL-SYNTAX: document more URL parsing details
- IPv4 numerical address
- IPv6 numerical address + zone id mention
- No IPvFuture support
- Some path parsing details

Closes #21841
2026-06-02 11:13:50 +02:00
Viktor Szakats
c5000b786b
build: say Quiche support is experimental, where missing
Follow-up to f2183f51b6 #21795

Closes #21832
2026-06-01 22:33:57 +02:00
Stefan Eissing
4ff212f8ed
url: connection reuse fixes for starttls
Add test_31_13 to check connection reuse on mixed --ssl-reqd setting.
For that add debug env var CURL_DBG_NO_USE_SSL_ON_FIRST to disable
--ssl-reqd for the first url. Check that the connection without SSL
from the first url is not reused on the second URL that requires it.

Tweak special ftp: protocol check to fail a DEBUGASSERT on mismatched
`use_ssl` settings as that should have been caught before in the
connection reuse matching (imap/smtp etc. do not have this extra check
and rely on the general part doing its job).

Closes #21665
2026-05-31 23:29:15 +02:00
Viktor Szakats
f1a6f190a6
badwords: prefer 'workaround' (without hyphen)
Closes #21807
2026-05-31 22:05:54 +02:00
Viktor Szakats
cfa735c40a
h3-proxy: rename feature 'Proxy/PROXY-HTTP3' to 'proxy-HTTP3'
For consistency and to follow existing 'HTTPS-proxy' (with lowercase
'proxy') feature tag more closely.

Follow-up to e78b1b3ecc #21153

Closes #21796
2026-05-28 12:52:50 +02:00
Viktor Szakats
f2183f51b6
build: say 'experimental' in option descriptions
Also:
- INSTALL-CMAKE.md: alpha-sort enable options.
- cmake: sync a description between source and docs.

Closes #21795
2026-05-28 12:52:50 +02:00
Viktor Szakats
4f31f076c2
INSTALL-CMAKE.md: document H2O config variable
Follow-up to e78b1b3ecc #21153

Closes #21769
2026-05-27 16:53:57 +02:00
Viktor Szakats
7e1001bcd6
tidy-up: miscellaneous
- H3 proxy: re-sync code with original source `curl_ngtcp2.c` to reduce
  differences, and to apply missed minor fixes. Also apply clang-format.
  Drop redundant `#undef`s, casts, `#endif` comments, includes, drop
  intermediate variables, sync include and macro order.
  Follow-up to e78b1b3ecc #21153
- INSTALL-CMAKE.md: move `CURL_ENABLE_SMB` to the enable section.
- tests/http/env: rename `tcpdmp` to `tcpdump` to match object variable.
- mbedtls: drop incorrect `mbedTLS 4+` comments.
  (features are also supported by 3+, meaning it's always supported.)
- lib1648: rename a variable to match purpose.
- CIPHERS.md: alpha-sort link list.
- replace rare `X''` hex markup with `0x`.
- `IP v4/6` -> `IPv4/6`.
- 'version X.Y' -> 'vX.Y', where sensible.
- 'VX.Y' -> 'vX.Y', where sensible.
- fix indents, casing, newlines, typos.

Closes #21772
2026-05-27 16:53:57 +02:00
Aritra Basu
e78b1b3ecc
HTTP/3: add proxy CONNECT and MASQUE CONNECT-UDP support (ngtcp2 QUIC)
This patch adds two major proxy capabilities to curl (ngtcp2 QUIC):
- HTTP/3 Proxy CONNECT: Tunnel HTTP/1.1 or HTTP/2 traffic through an
  HTTPS proxy that speaks HTTP/3 (QUIC) using the standard CONNECT
  method over an HTTP/3 connection.
- MASQUE CONNECT-UDP: Tunnel HTTP/3 (QUIC) traffic through an HTTP
  proxy (speaking HTTP/1.1, HTTP/2, or HTTP/3) using the extended
  CONNECT method with the CONNECT-UDP protocol (RFC9297 & RFC9298).

Public API additions:
- `CURLPROXY_HTTPS3`: new proxy type constant for HTTP/3 proxy
- `--proxy-http3`: new CLI flag to negotiate HTTP/3 with HTTPS proxy

The implementation adds two new filters:
- `H3-PROXY` - enables negotiating HTTP/3 (QUIC) to the proxy and
  running CONNECT/CONNECT-UDP through that proxy transport.
- `CAPSULE` - dedicated filter inserted between QUIC transport and
  HTTP-PROXY to handle datagram capsule encapsulation/decapsulation.

Here is how the curl filter chaining looks in different scenarios:
- HTTP/3 Proxy CONNECT (tunneling TCP protocols over QUIC proxy):
  conn -> HTTP/1.1 or HTTP/2  -> SSL -> HTTP-PROXY ->
                                 H3-PROXY -> HAPPY-EYEBALLS -> UDP
- MASQUE CONNECT-UDP (tunneling QUIC over any proxy):
  conn -> HTTP/3 -> CAPSULE -> HTTP-PROXY -> H3-PROXY ->
                               HAPPY-EYEBALLS -> UDP
  conn -> HTTP/3 -> CAPSULE -> HTTP-PROXY -> H1-PROXY or H2-PROXY ->
                               SSL -> HAPPY-EYEBALLS -> TCP

- Both features currently require the ngtcp2 QUIC backend.
- Both features are experimental (disabled by default). Enable with
  `--enable-proxy-http3`(autotools) or `-DUSE_PROXY_HTTP3=ON`(CMake).

Tests:
- tests/unit/unit3400.c: Unit tests for capsule protocol encode/decode
- tests/http/test_60_h3_proxy.py: Comprehensive pytest integration suite
- tests/http/testenv/h2o.py: Managing h2o instances with HTTP/1.1, HTTP/2,
  and HTTP/3 (QUIC) listeners, proxy.connect and proxy.connect-udp enabled.

References:
  RFC 9297 - HTTP Datagrams and the Capsule Protocol
  RFC 9298 - Proxying UDP in HTTP
  RFC 9000 §16 — Variable-Length Integer Encoding

Signed-off-by: Aritra Basu <aritrbas+gh@cisco.com>

Closes #21153
2026-05-27 08:49:53 +02:00
Viktor Szakats
0cb455aa85
INSTALL-CMAKE.md: drop two obsolete sections
Follow-up to 89043ba906 #20407

Closes #21761
2026-05-26 21:59:48 +02:00
mik
32227f83b4
docs: fix odd wording in CONTRIBUTE.md
Found with AI assistance, verified manually

Closes #21705
2026-05-26 11:27:46 +02:00
Daniel Stenberg
a4d8fd7a2a
VULN-DISCLOSURE-POLICY.md: emphasize the no email thank you part
Closes #21747
2026-05-26 10:00:22 +02:00
Max Dymond
307cfd008b KNOWN_BUGS: remove stale Threads::Threads entry
The old CMake bug about exporting -lpthread instead of Threads::Threads
no longer matches current master. As of 2d546d239e
("cmake: use Threads::Threads imported target for POSIX Threads"),
the build now uses Threads::Threads and the generated CMake package
config resolves the dependency explicitly, so this KNOWN_BUGS entry is stale.

Closes #21734
2026-05-24 11:12:30 +02:00
Jay Satiro
2ba0a0e41e CIPHERS.md: fix the example that uses only TLS 1.3
- Add --tls-max 1.3 to set the maximum version to TLS 1.3.

- Remove Schannel because it doesn't support TLS 1.3 ciphers since
  6238888.

Prior to this change the example set the minimum version to TLS 1.3 but
not the maximum version to TLS 1.3.

Ref: https://github.com/curl/curl/issues/21702

Closes https://github.com/curl/curl/pull/21719
2026-05-22 11:18:02 -04:00
Stefan Eissing
bfbff7852f
http2: remove stream dependency tracking
The HTTP/2 feature is deprecated, few servers implement it and our
implementation is complicated by its state management. Make the two
CURLOPT_* involved a nop and deprecate them.

Closes #21723
2026-05-22 09:44:08 +02:00
11soda11
2056498625
KNOWN_BUGS.md: remove fixed GnuTLS <-> OpenSSL incompat bug
The entry is about GnuTLS not sending the client cert when it doesn't
match the `DN` the server requested.  OpenSSL does the opposite.

The issue was already fixed by #4958 and removed from KNOWN_BUGS,
but it was added back to the list by #16677, seemingly by mistake.

The issue is still fixed for GnuTLS >= 3.5.0.
As curl only supports GnuTLS >= 3.6.5, remove the bug entry from
KNOWN_BUGS.md

Fixes #21720
Closes #21722
2026-05-22 08:13:51 +02:00
Viktor Szakats
419b1c0b75
checksrc: detect curlx_safefree() opportunities
Follow-up to bcd0497c81 #21700
Follow-up to 1c3289c85e #21684
Follow-up to c0f0e400e0 #5968
Follow-up to 0f4a03cbb6

Closes #21703
2026-05-21 11:07:34 +02:00
Joshua Rogers
f2692b54f7
docs: note CURLOPT_PINNEDPUBLICKEY has no effect on legacy LDAP backend
Closes #21682
2026-05-21 08:08:25 +02:00
Viktor Szakats
b3f76b21c9
tidy-up: miscellaneous
- fix typos and wording in documentation and comments.
- KNOWN_BUGS: merge duplicate H1 section.
- test_10_proxy: delete stray expressions.
- Perl: `while()` -> `while(1)`.
- Perl: fix indent, whitespace, drop redundant quotes and parentheses.
- fix casing: URL, SSL, Windows.
- badwords: readd `threadsafe`, add `well-known` (and fix it).
- replace `WinXP` -> `Windows XP` to match other uses.

Closes #21646
2026-05-20 00:50:43 +02:00
Viktor Szakats
d99dcfb04a
BUFQ.md: re-sync with source code
Also:
- move bullet points out from C code fences.
- fold long lines.

Follow-up to d4983ffc13 #17396

Closes #21678
2026-05-19 16:55:45 +02:00
Viktor Szakats
1fb734bc2d
docs: tidy-up scheme references
After this patch `://` schemes are lowercase and enclosed in backticks.

Also:
- docs/libcurl/libcurl-multi.md: drop a stray C code fence.
- docs/libcurl/libcurl-tutorial.md: replace single/double quotes with
  Markdown markup where applicable.

Ref: #21646

Closes #21674
2026-05-19 16:55:45 +02:00
Dan Fandrich
d24652971a docs/libcurl: fix the version for curl_multi_socket_action
It was added in 7.16.3, not 7.15.4 (that's when curl_multi_socket was
added).
2026-05-18 22:34:05 -07:00
Daniel Stenberg
64824e439d
VULN-DISCLOSURE-POLICY.md: test code is not secure
Don't tell us about it

Closes #21660
2026-05-18 16:19:06 +02:00
Daniel Stenberg
9107e8ba98
curl_easy_pause.md: rephrase the stream cache when pause clause
- mention HTTP/3
- it is 10 MB per stream these days

Closes #21658
2026-05-18 15:51:08 +02:00