Commit Graph

4939 Commits

Author SHA1 Message Date
Daniel Stenberg
ee2ca5826b
tool_operate: warn if too many output arguments were found
More output instructions than URLs is likely a user error.

Add test case 371 to verify

Closes #8210
2022-01-03 15:55:38 +01:00
Daniel Stenberg
eec5ce4ab4
urlapi: if possible, shorten given numerical IPv6 addresses
Extended test 1560 to verify

Closes #8206
2022-01-02 22:59:08 +01:00
Daniel Stenberg
d8f6e5dc8e
misc: update copyright year range 2021-12-30 14:17:47 +01:00
Daniel Stenberg
21248e052d
checksrc: detect more kinds of NULL comparisons we avoid
Co-authored-by: Jay Satiro
Closes #8180
2021-12-27 23:39:26 +01:00
Vladimir Panteleev
2c1dbc1af0
tests: Add test for CURLOPT_HTTP200ALIASES 2021-12-21 08:45:06 +01:00
Daniel Stenberg
7a92f865b4
misc: s/e-mail/email
Consistency is king. Following the lead in everything curl.

Closes #8159
2021-12-19 23:48:13 +01:00
Daniel Stenberg
c9e0549113
x509asn1: return early on errors
Overhaul to make sure functions that detect errors bail out early with
error rather than trying to continue and risk hiding the problem.

Closes #8147
2021-12-15 08:19:29 +01:00
Marc Hoersken
52202691d1
tests/data/test302[12]: fix MSYS2 path conversion of hostpubsha256
Ref: https://www.msys2.org/wiki/Porting/#filesystem-namespaces

Reviewed-by: Marcel Raad
Reviewed-by: Jay Satiro

Fixes #8084
Closes #8138
2021-12-14 07:43:16 +01:00
Daniel Stenberg
254f7bd78a
hash: lazy-alloc the table in Curl_hash_add()
This makes Curl_hash_init() infallible which saves error paths.

Closes #8132
2021-12-10 23:16:43 +01:00
Daniel Stenberg
439aa50211
test1156: fixup the stdout check for Windows
It is not text mode.

Follow-up to 6f73e68d18

Closes #8134
2021-12-10 17:00:37 +01:00
Daniel Stenberg
96c815c22e
test1528: enable for hyper
Closes #8128
2021-12-09 23:32:39 +01:00
Daniel Stenberg
b63bb77c79
test1527: enable for hyper
Closes #8128
2021-12-09 23:32:36 +01:00
Daniel Stenberg
34f090a5cc
test1526: enable for hyper
Closes #8128
2021-12-09 23:32:33 +01:00
Daniel Stenberg
8d0d5859e0
test1525: slightly tweaked for hyper
Closes #8128
2021-12-09 23:32:25 +01:00
Daniel Stenberg
6f73e68d18
test1156: enable for hyper
Minor reorg of the lib1156 code and it works fine for hyper.

Closes #8127
2021-12-09 23:30:34 +01:00
Daniel Stenberg
fde1f1bfe9
test661: enable for hyper
Closes #8126
2021-12-09 23:29:04 +01:00
Daniel Stenberg
f443834c7a
lib530: abort on curl_multi errors
This makes torture tests run more proper.

Also add an assert to trap situations where it would end up with no
sockets to wait for.

Closes #8121
2021-12-09 10:16:24 +01:00
Daniel Stenberg
45c6448e68
test1556: adjust for hyper
Closes #8105
2021-12-07 17:11:51 +01:00
Daniel Stenberg
1bea122114
test1554: adjust for hyper
Closes #8104
2021-12-07 17:09:14 +01:00
Daniel Stenberg
2b3dd01b77
multi: handle errors returned from socket/timer callbacks
The callbacks were partially documented to support this. Now the
behavior is documented and returning error from either of these
callbacks will effectively kill all currently ongoing transfers.

Added test 530 to verify

Reported-by: Marcelo Juchem
Fixes #8083
Closes #8089
2021-12-06 14:55:52 +01:00
Daniel Stenberg
92d1aee8b1
urlapi: accept port number zero
This is a regression since 7.62.0 (fb30ac5a2d).

Updated test 1560 accordingly

Reported-by: Brad Fitzpatrick
Fixes #8090
Closes #8091
2021-12-03 22:58:41 +01:00
Dan Fandrich
48cbd8f713 tests: Add some missing keywords to tests
These are needed to skip some tests when configure options have disabled
certain features.
2021-11-30 18:32:53 -08:00
Glenn Strauss
aae235b6ba
digest: compute user:realm:pass digest w/o userhash
https://datatracker.ietf.org/doc/html/rfc7616#section-3.4.4
  ... the client MUST calculate a hash of the username after
      any other hash calculation ...

Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
Closes #8066
2021-11-30 13:57:46 +01:00
Daniel Stenberg
230bb3e278
docs: consistent manpage SYNOPSIS
Make all libcurl related options use .nf (no fill) for the SYNOPSIS
section - for consistent look. roffit then renders that section using
<pre> (monospace font) in html for the website.

Extended manpage-syntax (test 1173) with a basic check for it.

Closes #8062
2021-11-26 16:51:23 +01:00
Daniel Stenberg
4183b8fe9a
urlapi: provide more detailed return codes
Previously, the return code CURLUE_MALFORMED_INPUT was used for almost
30 different URL format violations. This made it hard for users to
understand why a particular URL was not acceptable. Since the API cannot
point out a specific position within the URL for the problem, this now
instead introduces a number of additional and more fine-grained error
codes to allow the API to return more exactly in what "part" or section
of the URL a problem was detected.

Also bug-fixes curl_url_get() with CURLUPART_ZONEID, which previously
returned CURLUE_OK even if no zoneid existed.

Test cases in 1560 have been adjusted and extended. Tests 1538 and 1559
have been updated.

Updated libcurl-errors.3 and curl_url_strerror() accordingly.

Closes #8049
2021-11-25 08:36:04 +01:00
Kevin Burke
cc2870e275
tests/CI.md: add more information on CI environments
Fixes #8012
Closes #8022
2021-11-23 09:38:44 +01:00
Daniel Stenberg
3e6eb18fce
urlapi: reject short file URLs
file URLs that are 6 bytes or shorter are not complete. Return
CURLUE_MALFORMED_INPUT for those. Extended test 1560 to verify.

Triggered by #8041
Closes #8042
2021-11-23 08:45:21 +01:00
Daniel Stenberg
6e061ae63a
http: enable haproxy support for hyper backend
This is done by having native code do the haproxy header output before
hyper issues its request. The little downside with this approach is that
we need the entire Curl_buffer_send() function built, which is otherwise
not used for hyper builds.

If hyper ends up getting native support for the haproxy protocols we can
backpedal on this.

Enables test 1455 and 1456

Closes #8034
2021-11-19 14:06:42 +01:00
Patrick Monnerat
b20b364764
mime: use percent-escaping for multipart form field and file names
Until now, form field and file names where escaped using the
backslash-escaping algorithm defined for multipart mails. This commit
replaces this with the percent-escaping method for URLs.

As this may introduce incompatibilities with server-side applications, a
new libcurl option CURLOPT_MIME_OPTIONS with bitmask
CURLMIMEOPT_FORMESCAPE is introduced to revert to legacy use of
backslash-escaping. This is controlled by new cli tool option
--form-escape.

New tests and documentation are provided for this feature.

Reported by: Ryan Sleevi
Fixes #7789
Closes #7805
2021-11-15 10:40:03 +01:00
Daniel Stenberg
b7e1443a1d
test1939: require proxy support to run
Follow-up to f0b7099a10

Closes #8011
2021-11-14 16:14:52 +01:00
Daniel Stenberg
4825d0cd3a
test302[12]: run only with the libssh2 backend
... as the others don't support --hostpubsha256

Reported-by: Paul Howarth
Fixes #8009
Closes #8010
2021-11-14 16:13:50 +01:00
Daniel Stenberg
f4cafa4f0d
runtests: make the SSH library a testable feature
libssh2, libssh and wolfssh
2021-11-14 16:13:44 +01:00
Daniel Stenberg
26247a0d7e
lib1939: make it endure torture tests
Follow-up to f0b7099a10

Closes #8007
2021-11-13 22:44:34 +01:00
Daniel Stenberg
f0b7099a10
multi: shut down CONNECT in Curl_detach_connnection
... to prevent a lingering pointer that would lead to a double-free.

Added test 1939 to verify.

Reported-by: Stephen M. Coakley
Fixes #7982
Closes #7986
2021-11-11 08:42:31 +01:00
Marc Hoersken
b3e1ed3160
tests: add Schannel-specific tests and disable unsupported ones
Adds Schannel variants of SSLpinning tests that include the option
--ssl-revoke-best-effort to ignore certificate revocation check
failures which is required due to our custom test CA certificate.

Disable the original variants if the Schannel backend is enabled.

Also skip all IDN tests which are broken while using an msys shell.

This is a step to simplify test exclusions for Windows and MinGW.

Reviewed-by: Jay Satiro
Reviewed-by: Marcel Raad
Reviewed-by: Daniel Stenberg
Closes #7968
2021-11-09 06:34:33 +01:00
Daniel Stenberg
eccaa83cee
test1173: make manpage-syntax.pl spot \n errors in examples 2021-11-05 08:28:30 +01:00
Daniel Stenberg
cc71d35265
tool_operate: a failed etag save now only fails that transfer
When failing to create the output file for saving an etag, only fail
that particular single transfer and allow others to follow.

In a serial transfer setup, if no transfer at all is done due to them
all being skipped because of this error, curl will output an error
message and return exit code 26.

Added test 369 and 370 to verify.

Reported-by: Earnestly on github
Ref: #7942
Closes #7945
2021-11-04 13:56:15 +01:00
Marc Hoersken
d52316e460
tests/smbserver.py: fix compatibility with impacket 0.9.23+
impacket now performs sanity checks if the requested and to
be served file path actually is inside the real share path.

Ref: https://github.com/SecureAuthCorp/impacket/pull/1066

Fixes #7924
Closes #7935
2021-11-01 20:50:35 +01:00
Marc Hoersken
33dc399474
tests: kill some test servers afterwards to avoid locked logfiles
Reviewed-by: Daniel Stenberg
Closes #7925
2021-11-01 12:11:17 +01:00
Marc Hoersken
9121032fe3
CI/runtests.pl: restore -u flag, but remove it from CI runs
This makes it possible to use -u again for local testing,
but removes the flag from CI config files and make targets.

Reviewed-by: Daniel Stenberg

Partially reverts #7841
Closes #7921
2021-10-31 11:28:25 +01:00
Daniel Stenberg
6204aab43a
test1160: edited to work with hyper
Closes #7912
2021-10-27 22:58:21 +02:00
Daniel Stenberg
3b24b91019
data/DISABLED: enable tests that now work with hyper
Closes #7911
2021-10-27 22:57:29 +02:00
Daniel Stenberg
ba9477345e
test559: add 'HTTP' in keywords
Makes it run fine with hyper

Closes #7911
2021-10-27 22:57:26 +02:00
Daniel Stenberg
df84a79711
test552: updated to work with hyper
Closes #7911
2021-10-27 22:57:17 +02:00
Daniel Stenberg
c67a32fc56
http: reject HTTP response codes < 100
... which then also includes negative ones as test 1430 uses.

This makes native + hyper backend act identically on this and therefore
test 1430 can now be enabled when building with hyper. Adjust test 1431
as well.

Closes #7909
2021-10-27 10:26:15 +02:00
Daniel Stenberg
8d9af7062b
hyper: disable test 1294 since hyper doesn't allow such crazy headers
Closes #7905
2021-10-25 23:32:45 +02:00
Daniel Stenberg
bc8674d87d
c-hyper: make CURLOPT_SUPPRESS_CONNECT_HEADERS work
Verified by the enabled test 1288

Closes #7905
2021-10-25 23:32:45 +02:00
Daniel Stenberg
f9910e85fa
test1287: make work on hyper
Closes #7905
2021-10-25 23:32:45 +02:00
Daniel Stenberg
5c26764cd5
test1266/1267: disabled on hyper: no HTTP/0.9 support
Closes #7905
2021-10-25 23:32:44 +02:00
Daniel Stenberg
24155569d8
man pages: require all to use the same section header order
This is the same order we already enforce among the options' man pages:
consistency is good. Add lots of previously missing examples.

Adjust the manpage-syntax script for this purpose, used in test 1173.

Closes #7904
2021-10-25 12:57:01 +02:00