Commit Graph

30675 Commits

Author SHA1 Message Date
Emanuele Torre
df6c2f7b54
urlapi: respect CURLU_ALLOW_SPACE and CURLU_NO_AUTHORITY for redirects
curl_url_set(uh, CURLUPART_URL, redirurl, flags)  was not respecing
CURLU_ALLOW_SPACE and CURLU_NO_AUTHORITY in the host part of redirurl
when redirecting to an absolute URL.

Closes #11136
2023-05-18 20:52:59 +02:00
Colin Cross
e743425bc6
hostip: move easy_lock.h include above curl_memory.h
Similar to #9561, move easy_lock.h above curl_memory.h to fix building
against musl libc.

Closes #11140
2023-05-18 20:50:22 +02:00
Hind Montassif
de522c55ba
curl_easy_getinfo: clarify on return data types
Closes #11126
2023-05-18 20:46:36 +02:00
Emanuele Torre
f198d33e8d
checksrc: disallow spaces before labels
Out of 415 labels throughout the code base, 86 of those labels were
not at the start of the line. Which means labels always at the start of
the line is the favoured style overall with 329 instances.

Out of the 86 labels not at the start of the line:
* 75 were indented with the same indentation level of the following line
* 8 were indented with exactly one space
* 2 were indented with one fewer indentation level then the following
  line
* 1 was indented with the indentation level of the following line minus
  three space (probably unintentional)

Co-Authored-By: Viktor Szakats

Closes #11134
2023-05-18 20:45:04 +02:00
Daniel Stenberg
d334b02924
cookie: update the comment on cookie length and size limits
To refer to the proper cookie RFC and the upcoming RFC refresh.

Closes #11127
2023-05-18 20:43:25 +02:00
Daniel Stenberg
f1e5d8a731
url: provide better error message when URLs fail to parse
By providing the URL API error message into the error message.

Ref: #11129
Closes #11137
2023-05-18 20:42:17 +02:00
Daniel Stenberg
88ba931daa
RELEASE-NOTES: synced
bumped to 8.1.1
2023-05-18 13:45:54 +02:00
jonrumsey
9438bd26af
os400: update chkstrings.c
Compensate changes for recent changes to urldata.h to reclassify
STRING_AWS_SIGV4.

Fixes #11132
Closes #11133
2023-05-18 12:11:02 +02:00
Daniel Stenberg
a9f8fe2848
RELEASE-NOTES: synced 2023-05-17 08:06:02 +02:00
Daniel Stenberg
9566875eef
THANKS: contributors from the 8.1.0 release 2023-05-17 08:05:04 +02:00
Daniel Stenberg
f446258f02
hostip: include easy_lock.h before using GLOBAL_INIT_IS_THREADSAFE
Since that header file is the only place that define can be defined.

Reported-by: Marc Deslauriers

Follow-up to 13718030ad

Closes #11121
2023-05-17 08:03:10 +02:00
Thomas Taylor
ec91b9c08f
aws-sigv4.d: fix region identifier in example
Closes #11117
2023-05-16 08:25:21 +02:00
Philip H
0773d2a956
mlc_config.json: remove this linkcheck CI job config file
Closes #11113
2023-05-15 13:23:54 +02:00
Daniel Silverstone
e915b6904c
ssh: Add support for libssh2 read timeout
Hook the new (1.11.0 or newer) libssh2 support for setting a read timeout
into the SERVER_RESPONSE_TIMEOUT option.  With this done, clients can use
the standard curl response timeout setting to also control the time that
libssh2 will wait for packets from a slow server.  This is necessary to
enable use of very slow SFTP servers.

Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>

Closes #10965
2023-05-15 13:20:47 +02:00
Osama Albahrani
f157610d30
GIT-INFO: add --with-openssl
Closes #11110
2023-05-14 23:22:23 +02:00
Daniel Stenberg
4f17d434e9
RELEASE-NOTES: synced 2023-05-13 21:03:59 +02:00
Marcel Raad
2a154560c0
md(4|5): don't use deprecated iOS functions
They are marked as deprecated in iOS 13.0, which might result in
warnings-as-errors.

Also, use `*_MIN_REQUIRED` instead of `*_MIN_ALLOWED`, which seems to
be what's currently used.

Bug: https://github.com/curl/curl/issues/11098
Closes https://github.com/curl/curl/pull/11102
2023-05-13 09:57:54 +02:00
Marcel Raad
e587598534
md4: only build when used
Its only usage in curl_ntlm_core.c is guarded by `USE_CURL_NTLM_CORE`,
so let's use this here too.

Ref: https://github.com/curl/curl/issues/11098
Closes https://github.com/curl/curl/pull/11102
2023-05-13 09:57:35 +02:00
Vítor Galvão
de2542f3f2
write-out.d: Use response_code in example
Closes #11107
2023-05-12 23:19:19 +02:00
Shohei Maeda
ac5ad52142
url: fix null dispname for --connect-to option
Closes #11106
2023-05-12 17:52:07 +02:00
Daniel Stenberg
efa6c644aa
test2306: verify getting a second response with folded headers
Reproduces the isue #11101 and verifies the fix.

Verifies a17b2a503f
2023-05-12 17:50:33 +02:00
Daniel Stenberg
cd1c611b24
headers: clear (possibly) lingering pointer in init
The "prevhead" pointer is used for the headers storage but was not
cleared correctly in init, which made it possible to act up when a
handle is reused.

Reported-by: Steve Herrell
Fixes #11101
Closes #11103
2023-05-12 17:48:20 +02:00
Daniel Stenberg
5338a41056
RELEASE-NOTES: synced 2023-05-12 17:30:51 +02:00
Daniel Stenberg
10998e3b89
ngtcp2: use 0.15.0
- nghttp3 0.11.0
- nghttp2 1.53.0

Adapt to new API calls

Closes #11031
2023-05-12 17:25:38 +02:00
Jay Satiro
2cc1c93f45 openssl: fix indent 2023-05-10 14:03:30 -04:00
Daniel Stenberg
89756e87ee
CURLOPT_DNS_CACHE_TIMEOUT.3: fix spelling
Follow-up to 9ed7d56e04

Closes #11096
2023-05-10 00:24:14 +02:00
Daniel Stenberg
8e6abece40
hostip: use time_t for storing oldest DNS entry
Theoretically, the oldest time could overflow an int. In practice that
won't happen, but let's do this to please analyzers.

Follow-up to 9ed7d56e04

Pointed out by Coverity.
Closes #11094
2023-05-09 17:56:19 +02:00
Daniel Stenberg
f7170a8f2e
http: free the url before storing a new copy
To avoid a memory-leak.

Reported-by: Hiroki Kurosawa

Closes #11093
2023-05-09 09:47:30 +02:00
Daniel Stenberg
6708498588
compressed.d: clarify the words on "not notifying headers"
Reported-by: Dylan Anthony
Fixes #11091
Closes #11092
2023-05-09 09:20:12 +02:00
Daniel Stenberg
8e21b1a05f
libssh2: free fingerprint better
Reported-by: Wei Chong Tan
Closes #11088
2023-05-08 16:47:03 +02:00
Daniel Stenberg
5d36bdf490
CURLOPT_IPRESOLVE.3: clarify that this for host names, not IP addresses
Reported-by: Harry Sintonen
Closes #11087
2023-05-08 14:58:05 +02:00
Daniel Stenberg
9ed7d56e04
hostip: enforce a maximum DNS cache size independent of timeout value
To reduce the damage an application can cause if using -1 or other
ridiculous timeout values and letting the cache live long times.

The maximum number of entries in the DNS cache is now totally
arbitrarily and hard-coded set to 29999.

Closes #11084
2023-05-08 14:55:26 +02:00
Daniel Stenberg
f62557276a
hostip: store dns timeout as 'int'
... because it set and held as an 'int' elsewhere and can never be
larger.
2023-05-08 14:55:19 +02:00
Daniel Stenberg
86535e30af
RELEASE-NOTES: synced 2023-05-08 14:41:11 +02:00
Daniel Stenberg
39a33fcac0
tool_operate: refuse (--data or --form) and --continue-at combo
libcurl assumes that a --continue-at resumption is done to continue an
upload using the read callback and neither --data nor --form use
that and thus won't do what the user wants. Whatever the user wants
with this strange combination.

Add test 426 to verify.

Reported-by: Smackd0wn on github
Fixes #11081
Closes #11083
2023-05-08 14:10:44 +02:00
Daniel Stenberg
fb7886b9c9
transfer: refuse POSTFIELDS + RESUME_FROM combo
The code assumes that such a resume is wanting to continue an upload
using the read callback, and since POSTFIELDS is done without callback
libcurl will just misbehave.

This combo will make the transfer fail with CURLE_BAD_FUNCTION_ARGUMENT
with an explanation in the error message.

Reported-by: Smackd0wn on github
Fixes #11081
Closes #11083
2023-05-08 14:10:34 +02:00
Daniel Stenberg
39434db41f
ipv4.d/ipv6.d: they are "mutex", not "boolean"
... which for example means they do not have --no-* versions.

Reported-by: Harry Sintonen
Fixes #11085
Closes #11086
2023-05-08 14:09:40 +02:00
Daniel Stenberg
5a7ae421c5
docs/SECURITY-ADVISORY.md: how to write a curl security advisory
Closes #11080
2023-05-08 09:40:29 +02:00
nobedee on github
62ba84a2ab
MANUAL.md: add dict example for looking up a single definition
Closes #11077
2023-05-05 23:49:25 +02:00
Dan Fandrich
3d75029859 runtests: fix -c option when run with valgrind
The curl binary argument wasn't being quoted properly. This seems to
have broken at some point after quoting was added in commit 606b29fe.

Reported-by: Daniel Stenberg
Ref: #11073
Fixes #11074
Closes #11076
2023-05-05 09:52:38 -07:00
Dan Fandrich
faebcee349 runtests: support creating more than one runner process
The controller currently only creates and uses one, but more are now
possible.

Ref: #10818
2023-05-05 00:45:43 -07:00
Dan Fandrich
38465f9a55 runtests: spawn a new process for the test runner
When the -j option is given, a new process is spawned in which the test
programs are run and from which test servers are started. Only one
process can be started at once, but this is sufficient to test that the
infrastructure can isolate those functions in a new task. There should
be no visible difference between the two modes at the moment.

Ref: #10818
Closes #11064
2023-05-05 00:45:43 -07:00
Dan Fandrich
d4a1b5b60c runtests: turn singletest() into a state machine
This allows it to run in a non-blocking manner.

Ref: #10818
2023-05-05 00:45:43 -07:00
Dan Fandrich
a98277fcc7 runtests: change runner interface to be asynchronous
Program arguments are marshalled and then written to the end of a pipe
which is later read from and the arguments unmarshalled before the
desired function is called normally.  The function return values are
then marshalled and written into another pipe when is later read from
and unmarshalled before being returned to the caller.

The implementation is currently blocking but can be made non-blocking
without any changes to the API.  This allows calling multiple runners
without blocking in the future.

Ref: #10818
2023-05-05 00:45:43 -07:00
Dan Fandrich
0754de758a runtests: call citest_finishtest in singletest
This is where citest_starttest is called.

Ref: #10818
2023-05-05 00:45:43 -07:00
Dan Fandrich
d4d22adf40 runtests: add a runner initialization function
This sets up the runner environment to start running tests.

Ref: #10818
2023-05-05 00:45:43 -07:00
Dan Fandrich
82fa5ca836 runtests: remove directory from server filename variables
There will soon be multiple log directories so the paths will no longer
be static in runtests.pl. Also, get rid of $SERVER2IN which was not
used.

Ref: #10818
2023-05-05 00:45:43 -07:00
Dan Fandrich
b71a0c3ec9 runtests: reduce package exports after refactoring
Some recent refactoring made these export no longer necessary. Also,
stop displaying the Unix socket paths at startup since there will soon
be many of them and they're not that interesting.

Ref: #10818
2023-05-05 00:45:43 -07:00
Dan Fandrich
9fdad9dea1 runtests: use a function to obtain $LOGDIR for a test
This will no longer be static soon.

Ref: #10818
2023-05-05 00:45:43 -07:00
Jay Satiro
30ba26d9c3 tool_cb_hdr: Fix 'Location:' formatting for early VTE terminals
- Disable hyperlink formatting for the 'Location:' header value in VTE
  0.48.1 and earlier, since it is buggy in some of those versions.

Prior to this change those terminals may show the location header value
as gibberish or show it twice.

Ref: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda#backward-compatibility

Fixes https://github.com/curl/curl/issues/10428
Closes https://github.com/curl/curl/pull/11071
2023-05-05 02:52:23 -04:00