Commit Graph

31703 Commits

Author SHA1 Message Date
Daniel Stenberg
5cc2b016c3
md4: include strdup.h for the memdup proto
Reported-by: Erik Schnetter
Fixes #12849
Closes #12863
2024-02-05 23:38:12 +01:00
Joel Depooter
aefb0bde4e
docs: add missing slashes to SChannel client certificate documentation
When setting the CURLOPT_SSLCERT option to a certificate thumprint, it
is required to have a backslash between the "store location", "store
name" and "thumbprint" tokens. These slashes were present in the
previous documentation, but were missed in the transition to markdown
documentation.

Closes #12854
2024-02-05 22:55:38 +01:00
Stefan Eissing
0dc036225b
HTTP/2: write response directly
- use the new `Curl_xfer_write_resp()` to write incoming responses
  directly to the client
- eliminates `stream->recvbuf`
- memory consumption on parallel transfers minimized

Closes #12828
2024-02-05 22:29:21 +01:00
Daniel Stenberg
8911d86719
cookie.md: provide an example sending a fixed cookie
Closes #12868
2024-02-05 22:27:48 +01:00
Lars Kellogg-Stedman
3ec85206ad
ALTSVC.md: correct a typo
The ALPN documentation erroneously referred to a "host number" instead
of a "port number".

Closes #12852
2024-02-05 22:26:14 +01:00
Boris Verkhovskiy
7e2c53f72b
proxy1.0.md: fix example
Closes #12856
2024-02-05 19:41:50 +01:00
Chris Webb
541321507e
configure: add --disable-docs flag
Building man pages from curldown sources now requires perl. Add a
--disable-docs flag to configure to enable building and installing
without documentation where perl is not available or man pages are not
required. This is selected automatically (with a warning) when perl is
not found by configure.

Fixes #12832
Closes #12857
2024-02-05 19:39:52 +01:00
Faraz Fallahi
a84ad94dd6
connect.c: fix typo
Closes #12858
2024-02-05 19:33:14 +01:00
Daniel Stenberg
b8c003832d
sendf: ignore response body to HEAD
and mark the stream for close, but return OK since the response this far
was ok - if headers were received. Partly because this is what curl has
done traditionally.

Test 499 verifies. Updates test 689.

Reported-by: Sergey Bronnikov
Bug: https://curl.se/mail/lib-2024-02/0000.html
Closes #12842
2024-02-01 22:37:26 +01:00
Daniel Stenberg
10491957e3
ftp: treat a 226 arriving before data as a signal to read data
For active mode transfers.

Due to some interesting timing, curl can sometimes get the 226 (transfer
complete) over the control channel first, before the data connection
signals readability. If this happens, use that as a signal to check the
data connection.

Additionally, set the socket filter in listen mode *before* the
PORT/EPRT command is issued, to reduce the risk that the little time gap
could interfere.

This issue never reproduced for me on Debian and takes several hundred
rounds for me to trigger on my mac.

Reported-by: Stefan Eissing
Fixes #12823
Closes #12841
2024-02-01 22:32:38 +01:00
Patrick Monnerat
627c8c598f
OS400: avoid using awk in the build scripts
Awk is a PASE program and its use may cause a failure depending on the
CCSID of the calling script (IBM bug?).

For this reason, revert to an sed-only solution to extract the exported
symbols from the header files.

Closes #12826
2024-02-01 22:31:35 +01:00
Jan Macku
a911f4ffe6
docs: remove mk-ca-bundle.1 from man_MANS
It was accidentally added in https://github.com/curl/curl/pull/12730

Co-authored-by: Lukáš Zaoral <lzaoral@redhat.com>
Signed-off-by: Jan Macku <jamacku@redhat.com>

Follow-up to eefcc1bda4
Closes #12843
2024-02-01 16:08:33 +01:00
Daniel Stenberg
26f79419ee
RELEASE-NOTES: synced
and bump to 8.6.1 for now
2024-02-01 14:47:09 +01:00
Daniel Stenberg
5b50bf0cf6
cmdline-docs/Makefile: avoid using a fixed temp file name
By appending the pid number two different runs at the same time will not
trample over the same file.

Reported-by: Jon Rumsey
Fixes #12829
Closes #12839
2024-02-01 14:44:32 +01:00
Daniel Stenberg
8243ad6458
asyn-thread: use wakeup_close to close the read descriptor
Reported-by: Dan Fandrich
Ref: #12834
Closes #12836
2024-02-01 13:42:48 +01:00
Stefan Eissing
e75a48d2c3
ntml_wb: fix buffer type typo
Closes #12825
2024-02-01 13:04:56 +01:00
Daniel Stenberg
2f3e7a26bc
tool_operate: do not set CURLOPT_QUICK_EXIT in debug builds
Since it allows (small) memory leaks that interfere with torture tests
and regular memory-leak checks.

Reported-by: Dan Fandrich
Fixes #12834
Closes #12835
2024-02-01 11:43:47 +01:00
Boris Verkhovskiy
843800297f
form-string.md: correct the example
Closes #12822
2024-01-31 23:37:59 +01:00
Daniel Stenberg
5ce164e0e9
RELEASE-NOTES: synced
curl 8.6.0
2024-01-31 08:03:52 +01:00
Daniel Stenberg
4196191369
THANKS: new contributors from 8.5.0 2024-01-31 08:03:52 +01:00
Jay Satiro
f1041adff4 cd2nroff: use perl 'strict' and 'warnings'
- Use strict and warnings pragmas.

- If open() fails then show the reason.

- Set STDIN io layer :crlf so that input is properly read on Windows.

- When STDIN is used as input, the filename $f is now set to "STDIN".

Various error messages in single() use $f for the filename and this way
it is not undefined when STDIN.

Closes https://github.com/curl/curl/pull/12819
2024-01-31 00:43:21 -05:00
Daniel Stenberg
3e57bc2a84
cd2nroff: fix duplicate output issue
Assisted-by: Jay Satiro
Fixes https://github.com/curl/curl-www/issues/321
Closes #12818
2024-01-30 08:24:32 +01:00
Daniel Stenberg
011325ff29
lib: error out on multissl + http3
Since the QUIC/h3 code has no knowledge or handling of multissl it might
bring unintended consequences if we allow it.

configure, cmake and curl_setup.h all now reject this combination.

Assisted-by: Viktor Szakats
Assisted-by: Gisle Vanem
Ref: #12806
Closes #12807
2024-01-29 16:37:08 +01:00
Patrick Monnerat
2bfbb538d0
OS400: sync ILE/RPG binding
Also do not force git CRLF line endings on *.cmd files for OS400.

Closes #12815
2024-01-29 16:34:53 +01:00
Viktor Szakats
cb343182b7
build: delete/replace 3 more clang warning pragmas
- tool_msgs: delete redundant `-Wformat-nonliteral` suppression pragma.

- whitespace formatting in `mprintf.h`, lib518, lib537.

- lib518: fix wrong variable in `sizeof()`.

- lib518: bump variables to `rlim_t`.
  Follow-up to e2b394106d #1469

- lib518: sync error message with lib537
  Follow-up to 365322b8bc

- lib518, lib537: replace `-Wformat-nonliteral` suppression pragmas
  by reworking test code.

Follow-up to 5b286c2508 #12812
Follow-up to aee4ebe591 #12803
Follow-up to 0923012758 #12540
Follow-up to 3829759bd0 #12489

Reviewed-by: Daniel Stenberg
Closes #12814
2024-01-28 23:54:32 +00:00
Richard Levitte
0f4c19b66a
cmake: freshen up docs/INSTALL.cmake
- Turn docs/INSTALL.cmake into a proper markdown file,
  docs/INSTALL-CMAKE.md
- Move things around to divide the description into configuration,
  building and installing sections
- Mention the more modern cmake options to configure, build and install,
  but also retain the older variants as fallbacks

Closes #12772
2024-01-27 22:58:41 +01:00
Viktor Szakats
5b286c2508
build: delete/replace clang warning pragmas
- delete redundant warning suppressions for `-Wformat-nonliteral`.
  This now relies on `CURL_PRINTF()` and it's theoratically possible
  that this macro isn't active but the warning is. We're ignoring this
  as a corner-case here.

- replace two pragmas with code changes to avoid the warnings.

Follow-up to aee4ebe591 #12803
Follow-up to 0923012758 #12540
Follow-up to 3829759bd0 #12489

Reviewed-by: Daniel Stenberg
Closes #12812
2024-01-27 21:19:41 +00:00
Daniel Stenberg
ecb5d6bee9
RELEASE-NOTES: synced 2024-01-27 22:02:50 +01:00
Daniel Stenberg
066ed4e514
http: only act on 101 responses when they are HTTP/1.1
For 101 responses claiming to be any other protocol, bail out. This
would previously trigger an assert.

Add test 1704 to verify.

Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=66184
Closes #12811
2024-01-27 21:49:20 +01:00
Scarlett McAllister
6422ab6745
_VARIABLES.md: add missing 'be' into the sentence
Closes #12809
2024-01-27 12:46:43 +01:00
Stefan Eissing
bdae275958
mqtt, remove remaining use of data->state.buffer
Closes #12799
2024-01-27 12:42:19 +01:00
Daniel Stenberg
623c3a8fa0
x509asn1: switch from malloc to dynbuf
Closes #12808
2024-01-27 12:27:35 +01:00
Daniel Stenberg
cd48e8f8a9
x509asn1: make utf8asn1str() use dynbuf instead of malloc + memcpy
Closes #12808
2024-01-27 12:27:32 +01:00
Daniel Stenberg
98b41dd4bb
x509asn1: reduce malloc in Curl_extract_certinfo
Using dynbuf

Closes #12808
2024-01-27 12:27:25 +01:00
Jay Satiro
81d2b871ab THANKS: add Alexander Bartel and Brennan Kinney
They reported and investigated #10259 which was fixed by 7b2d98df.

Ref: https://github.com/curl/curl/issues/10259
2024-01-27 02:07:05 -05:00
Daniel Stenberg
aee4ebe591
krb5: add prototype to silence clang warnings on mvsnprintf()
"error: format string is not a string literal"

Follow-up to 0923012758 which made the warning appear

Assisted-by: Viktor Szakats
Closes #12803
2024-01-26 23:28:28 +01:00
Daniel Stenberg
641257ea08
x509asn1: remove code for WANT_VERIFYHOST
No code ever sets this anymore since we dropped gskit

Follow-up to 78d6232f1f

Closes #12804
2024-01-26 18:11:07 +01:00
Daniel Stenberg
a3a940702a
socks: reduce the buffer size to 600 (from 8K)
This is malloc'ed memory and it does not more. Test 742 helps us verify
this.

Closes #12789
2024-01-26 16:40:03 +01:00
Stefan Eissing
a6c9a33bf8
file+ftp: use stack buffers instead of data->state.buffer
Closes #12789
2024-01-26 16:38:21 +01:00
Stefan Eissing
9a90c9dd64
vtls: receive max buffer
- do not only receive one TLS record, but try to fill
  the passed buffer
- consider <4K remaning space is "filled".

Closes #12801
2024-01-26 15:46:15 +01:00
Daniel Stenberg
440bc97e4c
docs: do not start lines/sentences with So, But nor And
Closes #12802
2024-01-26 10:38:58 +01:00
Daniel Stenberg
92f8a1686d
docs: remove spurious ampersands from markdown
They were leftovers from the nroff conversion.

Follow-up to eefcc1bda4

Closes #12800
2024-01-26 10:35:56 +01:00
Patrick Monnerat
7b2d98dfad sasl: make login option string override http auth
- Use http authentication mechanisms as a default, not a preset.

Consider http authentication options which are mapped to SASL options as
a default (overriding the hardcoded default mask for the protocol) that
is ignored if a login option string is given.

Prior to this change, if some HTTP auth options were given, sasl mapped
http authentication options to sasl ones but merged them with the login
options.

That caused problems with the cli tool that sets the http login option
CURLAUTH_BEARER as a side-effect of --oauth2-bearer, because this flag
maps to more than one sasl mechanisms and the latter cannot be cleared
individually by the login options string.

New test 992 checks this.

Fixes https://github.com/curl/curl/issues/10259
Closes https://github.com/curl/curl/pull/12790
2024-01-26 02:58:21 -05:00
Stefan Eissing
65c7e4f92b
socks: use own buffer instead of data->state.buffer
Closes #12788
2024-01-26 08:50:17 +01:00
Daniel Stenberg
bc604619de
socks: fix generic output string to say SOCKS instead of SOCKS4
... since it was also logged for SOCKS5.

Closes #12797
2024-01-26 08:44:52 +01:00
Daniel Stenberg
cc42b008d5
test742: test SOCKS5 with max length user, password and hostname
Adjusted the socksd server accordingly to allow for configuring that
long user name and password.

Closes #12797
2024-01-26 08:44:46 +01:00
Stefan Eissing
6d85228709
ssh: use stack scratch buffer for seeks
- instead of data->state.buffer

Closes #12794
2024-01-25 22:33:49 +01:00
Daniel Stenberg
31db4bfa73
krb5: access the response buffer correctly
As the pingpong code no longer uses the download buffer.

Folllow-up to c2d973627b
Pointed-out-by: Stefan Eissing
Closes #12796
2024-01-25 22:32:53 +01:00
Stefan Eissing
73c4aaa2c0
mqtt: use stack scratch buffer for recv+publish
- instead of data->state.buffer

Closes #12792
2024-01-25 22:32:18 +01:00
Stefan Eissing
0c05b8f813
telnet, use stack scratch buffer for do
- instead of data->state.buffer

Closes #12793
2024-01-25 22:31:36 +01:00