A value whose first byte is ':' or '<' is not a SAFE-INIT-CHAR per RFC
2849 and must be base64-encoded, but ldap_value_needs_base64() and the
inline check in oldap_recv() only encoded on a control byte or
leading/trailing blank. Such a value was emitted verbatim, producing
LDIF that strict parsers reject.
Closes#22339
Document observed behavior around connections reuse and socket
callbacks. When CURLOPT_CLOSESOCKETFUNCTION is copied and when it is
invoked.
Closes#20521
Until 8.17.0 the --silent check lived in voutf(), so it covered every
message type that went through it. 56450ce26f moved that check out to
the callers so that errorf() could honour --show-error, and warnf() and
errorf() got the check back, but notef() did not. Since then "Note:"
messages have been printed even with --silent, as long as tracing was
on.
Reported-by: Jace Laquerre
Fixes#22623Closes#22625
Line should already have been removed in 7103a93, but neither
humans nor clankers caught it. tststs...
Prior to this change it appears all reuse of empty cred connection was
blocked for ntlm instead of the intended behavior of allowing
reuse in the limited circumstance when it is the same connection used by
the transfer before.
Closes https://github.com/curl/curl/pull/22629
As documented and as it does for other methods.
Difficult to test since it needs a successful kerberos ticket.
Reported-by: sdgh179 on github
Fixes#22610Closes#22622
Move the two remaining fields into the state struct instead, within the
HTTP ifdef.
Also: make the AWS sigv4 code always rely on the http_host value. It
was previously conditionally trying to also work if it was not set, but
that logic was not creating an identical copy so it would fail.
Closes#22620
When the minimum comes from `CURL_TEST_MIN`, to improve the default
behavior. It may still need manual adjustment in cases.
Follow-up to e669179681#22616
Follow-up to 58cb1e2f1f#22618
Cherry-picked from #22617Closes#22619
Set the default to `CURL_TEST_MIN` if set, first. Then process the
command-line options to override it. Previously, the env took over if
the command-line explicitly tried to set it to zero.
Ref: #22617
Follow-up to 3f1cd809ee#19942Closes#22618
After telemetry data from Mozilla reported the P99 DNS resolution
differences between A and AAAA responses to by 21ms, reduce curl's
resolution delay to 25ms.
What could possibly go wrong?
Closes#22612
Eleven arguments are named one way in the header and another in the
definition. the compiler only checks types so nothing is broken, but the
header is what people read first, and then the name changes under them
in the source:
```
curl_dbg_malloc size -> wantedsize
curl_dbg_calloc n, size -> wanted_elements, wanted_size
curl_dbg_realloc size -> wantedsize
curl_dbg_strdup src -> source
r_freeaddrinfo res -> cahead
my_get_line fp, db -> input, buf
curl_slist_append_ccsid l -> list
curl_version_info_ccsid cid -> ccsid
curl_easy_setopt_ccsid curl -> easy
```
Follow-up to df6014894b#20794Closes#22550
Replace the QUERY filter methods for connect and appconnect time with a
new control CF_CTRL_REPORT_STATS that is triggered when a connect ends
(successful or not).
Filters in the connection can then report their statistics. Socket and
TLS filters do this only once. Subsequent CF_CTRL_REPORT_STATS will do
nothing.
This prevents timers to be reported twice in STARTTLS scenarios.
Fixes#22587 (again)
Closes#22596
To simplify and to remove an exception where `errno` was reused to
return a socket error codes on Windows.
The error was used by one call site (`sockaddr2string()` in
`cf-socket.c`), but it was in practice always propagated as
`SOCKEAFNOSUPPORT` to callers.
Also:
- cf-socket: update 3 error messages to show `CURLcode` accordingly.
- if2ip: handle `curlx_inet_ntop()` error in `Curl_if2ip()`.
- dnsd: display `CURLcode` on two errors.
Follow-up to 39dec13ec0#22170Closes#22229
When creating a multi handle, global_init() may not have been
invoked that. There is a lazy check for this in easy_init()
that trigger global_init().
Create the admin handle for a multi first, before any further
operations, so easy_init() can trigger a global_init() when
necessary.
Closes#22606
- 'rtsp_transport'
There is no need to keep this data around once the RTSP request has been
issued.
- 'accept_encoding'
Only needed when creating the RTSP request.
- 'uagent'
The header is generated on demand from set.str[STRING_USERAGENT]
- 'ref'
Not necessary to keep around
Closes#22603
- sockindex: int -> int8_t
- move connectdata members around for fun and profit
- remove data->state.current_speed as unused
- remove data->state.trailers_bytes_sent as unsed
- remove data->state.trailers_buf as unsed
The sockindex type change spread a little.
Closes#22604
According to the content of the latest downloadable builds available at
(from 2022): https://www.riscos.info/packages/src/Network/, these builds
used autotools, not the handcrafted header. Also the handcrafted header
did not see an update (that I could find) since
0866c1b52d (2002-04-08), other than
source-wide maintenance updates.
Closes#22598
To make it easier to customize tests for individual matrix jobs.
Also:
- tested running riscv64 tests, but it takes too long (8.5-12 minutes,
for ~1000 HTTP tests.)
Follow-up to bf594226d6#22601Closes#22602
To remove a build difference between mingw-w64 and MSVC builds (where
mingw-w64 has it, while MSVC does not). Also to simplify and save the
cost of detection/verification in CI.
`gettimeofday()` was used in `curl_threads.c` in codepath practically
unreachable in Windows builds, and in `tool_writeout.c` that falls back
to `time()` for targets without it.
Ref: #22593Closes#22594
`opendir()` was used previously with mingw-w64 for `file://` directory
listing support. This was replaced by a native Win32 solution on all
Windows platforms, leaving `opendir()` no longer used. Drop related
feature detections.
Follow-up to c7c42afab9#22577Closes#22588
- show binary sizes and file types in 'curl -V' step, like rest of
workflows.
- make `build tests` step verbose.
- disable typecheck on emulated CPUs.
It results in 3-4x speed-up for riscv64, and ~2x for ARM64 when
building tests (in particular the libtests binary.)
Ref: 9e6f1c5efb#19637
- enable building tests in an ARM64 job.
- move examples build test from ARM64 to riscv64 (to spread job times).
Closes#22601
This is the only purpose it's maintained for.
Drop mingw-w64 and other logic falling outside of VS2010-2013 needs.
mingw-w64/MSVC platform differences keep being maintained/documented as
part of the CMake pre-fill logic in `CMake/win32-cache.cmake`.
Follow-up to ba8752e556#12224Closes#22595
Stop auto-skipping tests on emulated CPUs, replace it with explicit
`skipall` tags instead. To make it easier to enable tests on emulated
CPUs and to align with rest of workflows.
Closes#22599
New riscv64 job takes 4.5 minutes.
Also:
- use prefill on riscv64 to save 2 minutes configure time.
- disable manuals/perl on riscv64 to save ~1 minute (install, build).
- cmake: fix `HAVE_GETHOSTBYNAME_R_6` prefill for FreeBSD.
Ref: https://github.com/cross-platform-actions/action/releases/tag/v1.4.0Closes#22590
- Move expire timeout code from multi into splay.c
- keep a "time_base" timestamp to calculate timediff_t for
actual timeout values. Unfortunately this means our
timeouts will go wrong after ~500,000 years of continuous
operations...
- use timediff_t as key in splay instead of curltime
- use timediff_t in transfers expire times instead of curltime
- re-comment splay.c for better understanding how it works
- replace splay nodes double-linked "same" list with a single link,
we almost never have duplicate keys
- keep transfer `mid` in splay nodes instead of the transfer pointer
- keep registered bit in splay node for tracking instead of separate
bit in transfer
- adapt unit1309.c to changes in timediff_t and mid
Closes#22584
In GitHub runner image windows-2025-vs2026 v20260810.198.2, the default
Perl binary changed from MSYS2 to Strawberry. The reason is that the MSYS2
installation not longer has Perl preinstalled.
As seen in CMake configuration:
```diff
- -- Found Perl: C:/a/_temp/msys64/usr/bin/perl.exe (found version "5.42.2")
+ -- Found Perl: C:/Strawberry/perl/bin/perl.exe (found version "5.42.0")
```
curl's Perl scripts require an MSYS2 Perl. Fix by installing it manually
in this one job.
Symptom was `gencert.pl` no longer finding openssl.exe:
```
Missing or broken 'openssl' tool. openssl 1.0.2+ is required.
```
Then the script hanging while trying to trace it.
Also:
- add distinct error message and list PATH elements if openssl is not
found via `gencert.pl`.
- tried falling back to Git for Windows Perl, which caused the test step
to either hang or run too slowly to fit the time slot.
Refs:
https://github.com/actions/runner-images/pull/14541https://github.com/actions/runner-images/releases/tag/win25-vs2026%2F20260810.198
Bug: https://github.com/curl/curl/pull/22577#issuecomment-5286533641
Bug: https://github.com/curl/curl/pull/22577#issuecomment-5291468024Closes#22580
struct SingleRequest tweaks
- 'upgr101' from enum upgrade101 => 'unsigned char', saves three bytes
- made some 'unsigned char' => uint8_t
- moved 'io_flags' to fill a hole on 64-bit arch
struct UserDefined tweaks
- Sort the fields by size. Larger to smaller. Helps avoding holes.
- httpsig_algorithm moved
- FTP uint8_t fields moved
- new_file_perms moved
- rtspreq moved
- sort fields on size
- urldata: drop 'struct Curl_data_priority'
It only had a single struct member 'weight'. Use that directly instead
to save indirections and struct alignments. Move field for size order.
- urldata: move the RTSP fields in the UrlState struct to be ordered by
size
struct PureInfo tweaks
- make 'pxcode' a uint8_t
- move 'conn_protocol' to fill a hole
- sort 'struct PureInfo' fields by size
Closes#22585
Maintenance tasks like connection upkeep, liveliness checks and cache
eviction must only run on an admin handle, not the application transfer
from the calling context.
Then application transfers will get only attached to the connections
they actually work on. This makes `data->state.recent_conn_id`
meaningful for checks if a subsequent address is finding the previous
connection again.
One thing led to another:
- add Curl_get_admin(data), to obtain an admin handle for
an application handle, inheriting some properties for
connection operation.
- rename `Curl_easy *data` parameter to `Curl_easy *admin`
where only admin handles should be passed. Add DEBUGASSERTs
in the called function.
- rename `Curl_conn_terminate()` to `Curl_conn_close()`
because this makes connections enter the shutdown close
where possible.
- rename `Curl_cshutdn_terminate()` to `Curl_conn_terminate()`
since this definitely kills the connection and does not
involve a `cshutdn` instance.
- add Curl_share_lock_share(), Curl_share_unlock_share()
so it possible to operate on a share without the passed
easy handle having the share set.
This catches a case where a shared needed to be locked
but was not before. Adjust test1554 results.
Fixes#22567
Reported-by: cybertron10 on github
Closes#22572
When the time-out value is passed to the outside world it needs to fit
in a signed 32-bit variable (on Windows and 32-bit architectures)
anyway. Also, this is 3.5 weeks and we should not knowingly set timeouts
that long anyway.
The previous cap introduced in 3089e7eec8 was only partial.
Closes#22579
Curl_xfer_send() reports CURLE_AGAIN as a successful zero-byte send, so
the retry loop spun at 100% CPU and ignored the timeout when the peer
stopped draining. Wait for writability and check the remaining time
between retries.
Closes#22576