Commit Graph

2335 Commits

Author SHA1 Message Date
Daniel Stenberg
e7793cb57b
curl/header_json: output the header names in lowercase
To better allow json[“header”].

Reported-by: Peter Korsgaard
Bug: https://daniel.haxx.se/blog/2022/03/24/easier-header-picking-with-curl/comment-page-1/#comment-25878
Closes #8633
2022-03-25 11:24:27 +01:00
Daniel Stenberg
8e22fc68e7
scripts: move three scripts from lib/ to scripts/
Move checksrc.pl, firefox-db2pem.sh and mk-ca-bundle.pl since they don't
particularly belong in lib/

Also created an EXTRA_DIST= in scripts/Makefile.am instead of specifying
those files in the root Makefile.am

Closes #8625
2022-03-23 15:26:11 +01:00
Daniel Stenberg
23540923e1
test1459: disable for oldlibssh
This test with libssh 0.9.3 works fine on github but fails on circleci.
Might as well disable this test for oldlibssh installations.

Closes #8622
2022-03-22 16:36:10 +01:00
Daniel Stenberg
2e1ef61560
test1135: sync with recent API updates
This test verifies that the order of functions in public headers remain
the same but hasn't been updated to care for recently added header
files. The order is important for some few platforms - or VERSIONINFO
needs to updated.

This fix also updates VERSIONINFO to be sure.

Closes #8620
2022-03-22 14:28:18 +01:00
Daniel Stenberg
7c8c723682
configure: add --enable-headers-api to enable the headers API
Defaults to disabled while labeled EXPERIMENTAL.

Make all the headers API tests require 'headers-api' to run.
2022-03-22 08:24:26 +01:00
Daniel Stenberg
160b640a8b
test1671: verify -w '%{header_json} 2022-03-22 08:24:25 +01:00
Daniel Stenberg
62b60ed1a0
test1670: verify -w %header{} 2022-03-22 08:24:25 +01:00
Daniel Stenberg
d1e4a67734
header api: add curl_easy_header and curl_easy_nextheader
Add test 1940 to 1946 to verify.

Closes #8593
2022-03-22 08:24:22 +01:00
Daniel Stenberg
bdc664a640
test1459: remove the different exit code for oldlibssh
When using libssh/0.9.3/openssl/zlib, we seem to be getting the "right"
error code.

Closes #8490
2022-03-21 17:41:30 +01:00
Daniel Stenberg
dcdf2e8a36
http: return error on colon-less HTTP headers
It's a protocol violation and accepting them leads to no good.

Add test case 398 to verify

Closes #8610
2022-03-21 08:37:24 +01:00
Daniel Stenberg
33fe8251cb
test718: edited slightly to return better HTTP
Since hyper is picky and won't play ball otherwise.

Bug: https://github.com/hyperium/hyper/issues/2783
Reported-by: Daniel Valenzuela
Closes #8614
2022-03-20 22:54:49 +01:00
Daniel Stenberg
7e145dd270
hyper: no h2c support
Make tests require h2c feature present to run, and only set h2c if
nghttp2 is used in the build. Hyper does not support it.

Remove those tests from DISABLED

Fixes #8605
Closes #8613
2022-03-20 16:45:08 +01:00
Marcel Raad
265c50b2f8
test375: fix line endings on Windows
Closes https://github.com/curl/curl/pull/8599
2022-03-17 14:24:14 +01:00
Daniel Stenberg
526e0ef4cb
http: reject header contents with nul bytes
They are not allowed by the protocol and allowing them risk that curl
misbehaves somewhere where C functions are used but won't work on the
full contents. Further, they are not supported by hyper and they cause
problems for the new coming headers API work.

Updated test 262 to verify and enabled it for hyper as well

Closes #8601
2022-03-17 10:17:31 +01:00
HexTheDragon
1831a6e7f1
curl: add --no-clobber
Does not overwrite output files if they already exist

Closes #7708
Co-authored-by: Daniel Stenberg
2022-03-11 08:38:01 +01:00
Daniel Stenberg
08a96c6e4e
curl: add --remove-on-error
If a transfer returns an error, using this option makes curl remove the
leftover downloded (partial) local file before exiting.

Added test 376 to verify

Closes #8503
2022-03-10 19:57:55 +01:00
Daniel Stenberg
3e842078f3
test375: verify that --proxy errors out if proxy is disabled in the build
Closes #8565
2022-03-10 08:31:07 +01:00
Daniel Stenberg
95e8515ca0
curl: error out when options need features not present in libcurl
Trying to use a proxy when libcurl was built with proxy support disabled
should make curl error out properly.

Remove knowledge of disabled features from the tool code and instead
make it properly respond to what libcurl returns. Update all tests to
properly require the necessary features to be present/absent so that the
test suite can still be run even with libcurl builds with disabled
features.

Ref: https://curl.se/mail/archive-2022-03/0013.html
Closes #8565
2022-03-10 08:30:45 +01:00
Dan Fandrich
2583c3d1ce test386: Fix an incorrect test markup tag 2022-03-09 09:49:20 -08:00
Daniel Stenberg
7c140f6b2d
runtests: set 'oldlibssh' for libssh versions before 0.9.6
... and make test 1459 check for the different return code then.

Closes #8444
2022-02-14 08:26:44 +01:00
Daniel Stenberg
2610142139
lib: remove support for CURL_DOES_CONVERSIONS
TPF was the only user and support for that was dropped.

Closes #8378
2022-02-04 08:05:35 +01:00
Daniel Stenberg
32160cae84
tool_getparam: initial --json support
Adds these test cases:

 383 - simple single command line option
 384 - reading it from stdin
 385 - getting two --json options on command line
 386 - --next works after --json

Closes #8314
2022-02-01 10:39:55 +01:00
Jay Satiro
9b8ed6bc3e test3021: disable all msys2 path transformation
- Disable all MSYS2 path transformation in test3021 and test3022.

Prior to this change path transformation in those tests was disabled
only for arguments that start with forward slashes. However arguments
that are in base64 contain forward slashes at any position and caused
unwanted translations.

== Info: Denied establishing ssh session: mismatch sha256 fingerprint.
Remote +/EYG2YDzDGm6yiwepEMSuExgRRMoTi8Di1UN3kixZw= is not equal to
+C:/msys64/EYG2YDzDGm6yiwepEMSuExgRRMoTi8Di1UN3kixZw

In the above example an argument containing a base64 sha256 fingerprint
was passed to curl after MSYS2 translated +/ into +C:/msys64/, and then
the fingerprint didn't match what was expected.

Ref: https://www.msys2.org/wiki/Porting/

Fixes https://github.com/curl/curl/issues/8084
Closes https://github.com/curl/curl/pull/8325
2022-01-28 02:40:16 -05:00
Daniel Stenberg
b27ad8e1d3
url: revert the removal of trailing dot from host name
Reverts 5de8d84098 (May 2014, shipped in 7.37.0) and the
follow-up changes done afterward.

Keep the dot in names for everything except the SNI to make curl behave
more similar to current browsers. This means 'name' and 'name.' send the
same SNI for different 'Host:' headers.

Updated test 1322 accordingly

Fixes #8290
Reported-by: Charles Cazabon
Closes #8320
2022-01-27 08:35:18 +01:00
Daniel Stenberg
f974bee623
curl: remove "separators" (when using globbed URLs)
Unless muted (with -s) When doing globbing, curl would output mime-like
separators between the separate transfers. This is not documented
anywhere, surprises users and clobbers the output. Gone now.

Updated test 18 and 1235

Reported-by: jonny112 on github
Bug: https://github.com/curl/curl/discussions/8257
Closes #8278
2022-01-15 23:41:28 +01:00
Fabian Keil
e1e9d5af73
test374: gif data without new line at the end
Closes #8239
2022-01-10 15:54:54 +01:00
Daniel Stenberg
7edb0fcf3f
ldap: return CURLE_URL_MALFORMAT for bad URL
For consistency, use the same return code for URL malformats,
independently of what scheme that is used. Previously this would return
CURLE_LDAP_INVALID_URL, but starting now that error cannot be returned.

Closes #8170
2022-01-10 09:37:47 +01:00
Daniel Stenberg
1f7234a290
data/DISABLED: disable test 313 for wolfssl builds
It was previously disabled only in the CI jobs yaml

Closes #8252
2022-01-09 18:08:33 +01:00
Daniel Stenberg
4c843fddcf
DISABLE: disable a dozen tests in the rustls build
Disables tests that don't yet work with the rustls backend.

Fixes #8004
Closes #8250
2022-01-09 16:06:19 +01:00
Daniel Stenberg
d1237ac906
url: given a user in the URL, find pwd for that user in netrc
Add test 380 and 381 to verify, edited test 133

Reported-by: Manfred Schwarb
Fixes #8241
Closes #8243
2022-01-09 14:16:41 +01:00
Daniel Stenberg
764e4f066d
tool_findfile: check ~/.config/curlrc too
... after the initial checks for .curlrc and if XDG_CONFIG_HOME is not
set, use $HOME and $CURL_HOME to check if ~/.config/curlrc is present.

Add test 436 to verify

Reported-by: Sandro Jaeckel
Fixes #8208
Closes #8213
2022-01-07 10:10:49 +01:00
Fabian Keil
5da22337fe
Add test373: multiple chunks with binary zeros 2022-01-07 10:01:44 +01:00
Fabian Keil
33d0503103
Add test372: binary zero in data element 2022-01-07 10:01:44 +01:00
Daniel Stenberg
99c42919d0
test719-721: require "proxy" feature present to run
Bug: https://github.com/curl/curl/pull/8223#issuecomment-1005188696
Reported-by: Marc Hörsken

Closes #8226
2022-01-05 00:35:21 +01:00
Daniel Stenberg
47f03aa2c6
test719: require ipv6 support to run
Follow-up to effd2bd7ba
Reported-by: Marc Hörsken
Bug: https://github.com/curl/curl/pull/8217#issuecomment-1004681145

Closes #8223
2022-01-04 11:47:44 +01:00
Daniel Stenberg
dbbf3609f3
test719-721: verify SOCKS details
Using the new verify/socks details
2022-01-03 22:32:05 +01:00
Daniel Stenberg
effd2bd7ba
socks5: use appropriate ATYP for numerical IP address host names
When not resolving the address locallly (known as socks5h).

Add test 719 and 720 to verify.

Reported-by: Peter Piekarski
Fixes #8216
Closes #8217
2022-01-03 22:32:05 +01:00
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
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
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
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
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