Commit graph

7545 commits

Author SHA1 Message Date
Viktor Szakats
7ddd6405b4
later/older -> higher/lower 2026-06-13 00:09:05 +02:00
Viktor Szakats
97e75f98b7
and later -> or higher 2026-06-13 00:09:05 +02:00
Viktor Szakats
a0b616162f
or greater/above -> higher (400) 2026-06-13 00:09:05 +02:00
Viktor Szakats
6ba2ab0741
or later -> newer (Windows version) 2026-06-13 00:09:05 +02:00
Viktor Szakats
eb2edbb00f
or later -> higher 2026-06-13 00:09:05 +02:00
Viktor Szakats
c4707f2890
or greater -> higher 2026-06-13 00:09:05 +02:00
Viktor Szakats
a2e9dfa9f0
or older -> lower 2026-06-13 00:09:05 +02:00
Viktor Szakats
e9347d54e4
or above -> higher 2026-06-13 00:09:05 +02:00
Viktor Szakats
7d02e46280
or newer -> higher 2026-06-13 00:09:05 +02:00
Viktor Szakats
1d5dc6d2f9
or later -> higher 2026-06-13 00:09:04 +02:00
Viktor Szakats
68a0bb1f50
or upper -> higher 2026-06-13 00:08:23 +02:00
Stefan Eissing
73daec6620
lib: transfer origin and proxy handling
Add `data->state.origin` as the origin the transfer is sending the
current request to/gets the response from. Use it for request specific
properties like authentication, hsts and cookie handling, etc.

Unless talking to a forwarding HTTP proxy (e.g. not tunneling),
`data->state.origin` and `conn->origin` are the same.

With a forwarding HTTP proxy in play, `conn->origin` is set to
`conn->http_proxy.peer` and `conn->bits.origin_is_proxy` (a new bit) is
set.

Remove the connection bits, now replaced with:

* `conn->bits.socksproxy` -> `conn->socks_proy.peer`
* `conn->bits.httpproxy` -> `conn->http_proy.peer`
* `conn->bits.proxy` -> `(conn->socks_proy.peer || conn->http_proy.peer`)
* `conn->bits.tunnel_proxy` -> (`conn->http_proy.peer && !conn->bits.origin_is_proxy`)
* `(conn->bits.httpproxy && !conn->bits.tunnel_proxy)` -> `conn->bits.origin_is_proxy`

Rename `noproxy.[ch]` to `proxy.[ch]`. Move the connection proxy setup
code from `url.c` to `proxy.c`.

Remove `data->info.conn_remote_port` as no one uses it.

Add test_40_02b for a SOCKS connection to a forwarding HTTPS proxy.

Update internal documentation about peers and creds.

Closes #21967
2026-06-12 23:52:00 +02:00
Daniel Stenberg
ab3bb8cd8b
config2setopts: use default protocol properly
Verified by test 1724, 1725 and 2036

Closes #21983
2026-06-12 12:57:15 +02:00
Viktor Szakats
e35ba09f47
tidy-up: add spaces around equal operators where missing
Found via regex search: `=[^~>= ]`

Closes #21975
2026-06-11 19:52:01 +02:00
Viktor Szakats
2a606c68fa
tidy-up: miscellaneous
- GHA/windows: drop redundant double-quotes.
- CMake/PickyWarnings: improve/shorten comment.
- INTERNALS: fix typo in LibreSSL release date.
- drop redundant parentheses from single variables and sole `#if`
  expressions.
- cf-ip-happy: fix missing space from error string.
- telnet: fix parentheses in commented PP code.
- lib1922: fix typo test output text.
- smbserver: unfold lines.
- smbserver: use f-string.
- smbserver: initialize binary string as b``.
- fix typos in comments.

Closes #21972
2026-06-11 19:48:07 +02:00
Daniel Stenberg
08ae71f33d
CURLOPT_WRITEFUNCTION.md: remove stray reference to HSTS
It appears to have landed here by mistake

Closes #21968
2026-06-11 16:02:05 +02:00
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