Commit Graph

30961 Commits

Author SHA1 Message Date
Daniel Stenberg
b3ee22193a
cmdline-opts/docs: mentioned the negative option part
... for --no-alpn and --no-buffer in the same style done for other --no-
options:

"Note that this is the negated option name documented."

Closes #11695
2023-08-19 23:51:46 +02:00
Emanuele Torre
70f1b540f3
tool/var: also error when expansion result starts with NUL
Expansions whose output starts with NUL were being expanded to the empty
string, and not being recognised as values that contain a NUL byte, and
should error.

Closes #11694
2023-08-19 23:50:37 +02:00
Daniel Stenberg
1c3fcbdaa9
tests: add 'large-time' as a testable feature
This allows test cases to require this feature to run and to be used in
%if conditions.

Large here means larger than 32 bits. Ie does not suffer from y2038.

Closes #11696
2023-08-19 23:37:02 +02:00
Daniel Stenberg
98483a8a3f
tests/Makefile: add check-translatable-options.pl to tarball
Used in test 1544

Follow-up to ae806395ab
2023-08-18 08:49:17 +02:00
Daniel Stenberg
c5eda5df64
gen.pl: fix a long version generation mistake
Too excessive escaping made the parsing not find the correct long names
later and instead add "wrong" links.

Follow-up to 439ff2052e

Reported-by: Lukas Tribus
Fixes #11688
Closes #11689
2023-08-18 08:18:30 +02:00
Daniel Stenberg
74b87a8af1
lib: move mimepost data from ->req.p.http to ->state
When the legacy CURLOPT_HTTPPOST option is used, it gets converted into
the modem mimpost struct at first use. This data is (now) kept for the
entire transfer and not only per single HTTP request. This re-enables
rewind in the beginning of the second request instead of in end of the
first, as brought by 1b39731.

The request struct is per-request data only.

Extend test 650 to verify.

Fixes #11680
Reported-by: yushicheng7788 on github
Closes #11682
2023-08-17 23:49:57 +02:00
Patrick Monnerat
821d108fc9
os400: do not check translatable options at build time
Now that there is a test for this, the build time check is not needed
anymore.

Closes #11650
2023-08-17 17:34:57 +02:00
Patrick Monnerat
ae806395ab
test1554: check translatable string options in OS400 wrapper
This test runs a perl script that checks all string options are properly
translated by the OS400 character code conversion wrapper. It also
verifies these options are listed in alphanumeric order in the wrapper
switch statement.

Closes #11650
2023-08-17 17:34:35 +02:00
Daniel Stenberg
e90d356570
unit3200: skip testing if function is not present
Fake a successful run since we have no easy mechanism to skip this test
for this advanced condition.
2023-08-17 17:17:59 +02:00
Daniel Stenberg
de7d421067
unit2600: fix build warning if built without verbose messages 2023-08-17 17:17:59 +02:00
Daniel Stenberg
7c4cb065b7
test1608: make it build and get skipped without shuffle DNS support 2023-08-17 17:17:59 +02:00
Daniel Stenberg
e67718eef7
lib: --disable-bindlocal builds curl without local binding support 2023-08-17 17:17:59 +02:00
Daniel Stenberg
97a79c79a7
test1304: build and skip without netrc support 2023-08-17 17:17:59 +02:00
Daniel Stenberg
acca40c9b5
lib: build fixups when built with most things disabled
Closes #11687
2023-08-17 17:17:54 +02:00
Daniel Stenberg
793157c51b
workflows/macos.yml: disable zstd and alt-svc in the http-only build
Closes #11683
2023-08-17 16:58:58 +02:00
Stefan Eissing
1bccee76c8
bearssl: handshake fix, provide proper get_select_socks() implementation
- bring bearssl handshake times down from +200ms down to other TLS backends
- vtls: improve generic get_select_socks() implementation
- tests: provide Apache with a suitable ssl session cache

Closes #11675
2023-08-17 13:45:08 +02:00
Stefan Eissing
57e81ff3db
tests: TLS session sharing test
- test TLS session sharing with special test client
- expect failure with wolfSSL
- disable flaky wolfSSL test_02_07b

Closes #11675
2023-08-17 13:44:55 +02:00
Daniel Stenberg
dd094ba547
CURLOPT_*TIMEOUT*: extend and clarify
Closes #11686
2023-08-17 13:01:47 +02:00
Daniel Stenberg
a281057091
urlapi: return CURLUE_BAD_HOSTNAME if puny2idn encoding fails
And document it. Only return out of memory when it actually is a memory
problem.

Pointed-out-by: Jacob Mealey
Closes #11674
2023-08-17 08:21:08 +02:00
Mathew Benson
9ec764ee1f
cmake: add GnuTLS option
- Option to use GNUTLS was missing. Hence was not able to use GNUTLS
  with ngtcp2 for http3.

Closes #11685
2023-08-17 08:17:39 +02:00
Daniel Stenberg
eb3b049df5
RELEASE-NOTES: synced 2023-08-16 11:11:24 +02:00
Daniel Stenberg
be21769cc7
http: remove the p_pragma struct field
unused since 40e8b4e52 (2008)

Closes #11681
2023-08-16 11:01:10 +02:00
Jay Satiro
8843bef318 CURLINFO_CERTINFO.3: better explain curl_certinfo struct
Closes https://github.com/curl/curl/pull/11666
2023-08-16 03:21:49 -04:00
Jay Satiro
24ad247107 CURLINFO_TLS_SSL_PTR.3: clarify a recommendation
- Remove the out-of-date SSL backend list supported by
  CURLOPT_SSL_CTX_FUNCTION.

It makes more sense to just refer to that document instead of having
a separate list that has to be kept in sync.

Closes https://github.com/curl/curl/pull/11665
2023-08-16 03:20:56 -04:00
Jay Satiro
2e8fbec2db
write-out.d: clarify %{time_starttransfer}
sync it up with CURLINFO_STARTTRANSFER_TIME_T
2023-08-15 14:52:12 +02:00
Daniel Stenberg
ab3b2c47bd
transfer: don't set TIMER_STARTTRANSFER on first send
The time stamp is for measuring the first *received* byte

Fixes #11669
Reported-by: JazJas on github
Closes #11670
2023-08-15 14:52:01 +02:00
trrui-huawei
23c3dc20c1
quiche: enable quiche to handle timeout events
In parallel with ngtcp2, quiche also offers the `quiche_conn_on_timeout`
interface for the application to invoke upon timer
expiration. Therefore, invoking the `on_timeout` function of the
Connection is crucial to ensure seamless functionality of quiche with
timeout events.

Closes #11654
2023-08-15 14:38:31 +02:00
trrui-huawei
bcc51b76c5
quiche: adjust quiche QUIC_IDLE_TIMEOUT to 60s
Set the `QUIC_IDLE_TIMEOUT` parameter to match ngtcp2 for consistency.
2023-08-15 14:37:54 +02:00
Daniel Stenberg
ce254fa96f
KNOWN_BUGS: LDAPS requests to ActiveDirectory server hang
Closes #9580
2023-08-15 14:21:15 +02:00
Daniel Stenberg
8a86ccf343
imap: add a check for failing strdup() 2023-08-14 18:07:12 +02:00
Daniel Stenberg
91765104c2
imap: remove the only sscanf() call in the IMAP code
Avoids the use of a stack buffer.

Closes #11673
2023-08-14 18:07:12 +02:00
Daniel Stenberg
de5f66595e
imap: use a dynbuf in imap_atom
Avoid a calculation + malloc. Build the output in a dynbuf.

Closes #11672
2023-08-14 15:56:11 +02:00
Marin Hannache
67e9e3cb1e
http: do not require a user name when using CURLAUTH_NEGOTIATE
In order to get Negotiate (SPNEGO) authentication to work in HTTP you
used to be required to provide a (fake) user name (this concerned both
curl and the lib) because the code wrongly only considered
authentication if there was a user name provided, as in:

  curl -u : --negotiate https://example.com/

This commit leverages the `struct auth` want member to figure out if the
user enabled CURLAUTH_NEGOTIATE, effectively removing the requirement of
setting a user name both in curl and the lib.

Signed-off-by: Marin Hannache <git@mareo.fr>
Reported-by: Enrico Scholz
Fixes https://sourceforge.net/p/curl/bugs/440/
Fixes #1161
Closes #9047
2023-08-14 10:21:46 +02:00
Viktor Szakats
c90c78333b
build: streamline non-UWP wincrypt detections
- with CMake, use the variable `WINDOWS_STORE` to detect an UWP build
  and disable our non-UWP-compatible use the Windows crypto API. This
  allows to drop two dynamic feature checks.

  `WINDOWS_STORE` is true when invoking CMake with
  `CMAKE_SYSTEM_NAME` == `WindowsStore`. Introduced in CMake v3.1.

  Ref: https://cmake.org/cmake/help/latest/variable/WINDOWS_STORE.html

- with autotools, drop the separate feature check for `wincrypt.h`. On
  one hand this header has been present for long (even Borland C 5.5 had
  it from year 2000), on the other we used the check result solely to
  enable another check for certain crypto functions. This fails anyway
  with the header not present. We save one dynamic feature check at the
  configure stage.

Reviewed-by: Marcel Raad
Closes #11657
2023-08-13 13:51:19 +00:00
Nicholas Nethercote
a5d260609d
docs/HYPER.md: update hyper build instructions
Nightly Rust and `-Z unstable-options` are not needed.

The instructions here now match the hyper docs exactly:
bd7928f3dd

Closes #11662
2023-08-13 15:50:31 +02:00
Daniel Stenberg
56163e5fd3
RELEASE-NOTES: synced 2023-08-13 15:43:32 +02:00
Daniel Stenberg
c350069f64
urlapi: CURLU_PUNY2IDN - convert from punycode to IDN name
Asssisted-by: Jay Satiro
Closes #11655
2023-08-13 15:34:38 +02:00
Daniel Stenberg
0efe8b215c
spellcheck: adapt to backslashed minuses
As the curl.1 has more backslashed minus, the cleanup sed lines xneed to
adapt.

Adjusted some docs slighly.

Follow-up to 439ff2052e

Closes #11663
2023-08-12 11:10:21 +02:00
Daniel Stenberg
439ff2052e
gen: escape more minus
Detected since it was still hard to search for option names using dashes
in the middle in the man page.

Closes #11660
2023-08-11 20:51:00 +02:00
Daniel Stenberg
00ac47bfaa
cookie-jar.d: enphasize that this option is ONLY writing cookies
Reported-by: Dan Jacobson
Tweaked-by: Jay Satiro
Ref: #11642
Closes #11661
2023-08-11 20:49:36 +02:00
Nicholas Nethercote
686951f7be
docs/HYPER.md: document a workaround for a link error
Closes #11653
2023-08-11 20:05:17 +02:00
Jay Satiro
889c071d3c schannel: verify hostname independent of verify cert
Prior to this change when CURLOPT_SSL_VERIFYPEER (verifypeer) was off
and CURLOPT_SSL_VERIFYHOST (verifyhost) was on we did not verify the
hostname in schannel code.

This fixes KNOWN_BUG 2.8 "Schannel disable CURLOPT_SSL_VERIFYPEER and
verify hostname". We discussed a fix several years ago in #3285 but it
went stale.

Assisted-by: Daniel Stenberg

Bug: https://curl.haxx.se/mail/lib-2018-10/0113.html
Reported-by: Martin Galvan

Ref: https://github.com/curl/curl/pull/3285

Fixes https://github.com/curl/curl/issues/3284
Closes https://github.com/curl/curl/pull/10056
2023-08-11 12:27:18 -04:00
Daniel Stenberg
c7056759be
curl_quiche: remove superfluous NULL check
'stream' is always non-NULL at this point

Pointed out by Coverity

Closes #11656
2023-08-11 11:43:17 +02:00
Daniel Stenberg
e1356f4c45
curl/urlapi.h: tiny typo 2023-08-11 09:17:11 +02:00
Daniel Stenberg
6396c1f893
github/labeler: make HYPER.md set Hyper and not TLS 2023-08-11 08:59:26 +02:00
Daniel Stenberg
b2118da399
docs/cmdline-opts/gen.pl: hide "added in" before 7.50.0
7.50.0 shipped on Jul 21 2016, over seven years ago. We no longer need
to specify version changes for earlier releases in the generated output.

This ups the limit from the previous 7.30.0 (Apr 12 2013)

This hides roughly 35 "added in" mentions.

Closes #11651
2023-08-10 16:26:31 +02:00
Jay Satiro
86b45f6e7e bug_report: require reporters to specify curl and os versions
- Change curl version and os sections from single-line input to
  multi-line textarea.

- Require curl version and os sections to be filled out before report
  can be submitted.

Closes https://github.com/curl/curl/pull/11636
2023-08-10 03:28:36 -04:00
Daniel Stenberg
abd8f2b78b
gen.pl: replace all single quotes with aq
- this prevents man from using a unicode sequence for them
- which then allows search to work properly

Closes #11645
2023-08-09 17:58:35 +02:00
Viktor Szakats
121e60b958
cmake: fix to use variable for the curl namespace
Replace (wrong) literal with a variable to specify the curl
namespace.

Follow-up to 1199308dbc #11505

Reported-by: balikalina on Github
Fixes 1199308dbc (r123923098)
Closes #11629
2023-08-09 12:01:46 +00:00
Viktor Szakats
fc9bfb1452
cmake: allow SHARE_LIB_OBJECT=ON on all platforms
2ebc74c36a #11546 introduced sharing
libcurl objects for shared and static targets.

The above automatically enabled for Windows builds, with an option to
disable with `SHARE_LIB_OBJECT=OFF`.

This patch extend this feature to all platforms as a manual option.
You can enable it by setting `SHARE_LIB_OBJECT=ON`. Then shared objects
are built in PIC mode, meaning the static lib will also have PIC code.

[EXPERIMENTAL]

Closes #11627
2023-08-09 12:01:07 +00:00