Commit Graph

2369 Commits

Author SHA1 Message Date
Daniel Stenberg
19f981b4ff
test679: verify netrc quoted string 2022-05-31 09:05:01 +02:00
Marc Hoersken
2d7044a191
tests/data/test1940: use binary mode for expected stdout
The generated stdout data is written in binary mode with [LF]
line endings, therefore we also need to do a binary comparison.

Assisted-by: Jay Satiro
Assisted-by: Daniel Stenberg

Follow up to c9b60f0053
Fixes #8920
Closes #8936
2022-05-30 09:23:41 +02:00
Daniel Stenberg
ba6a3fd3ee
DISABLED: add six tests that fail with hyper
1117 1274 1940 1941 1942 1943
2022-05-25 13:07:12 +02:00
Marc Hoersken
2d5b8048a5
tests/data/test1501: kill ftp server after slow LIST response
This test is contributing to flakiness on the Windows CI runs.
Killing the ftp server after the test run like other slowness
tests already do may help resolve or reduce the flakiness.

Closes #8907
2022-05-25 12:39:52 +02:00
Daniel Stenberg
c9b60f0053
http: restore header folding behavior
Folded header lines will now get passed through like before. The headers
API is adapted and will provide the content unfolded.

Added test 1274 and extended test 1940 to verify.

Reported-by: Petr Pisar
Fixes #8844
Closes #8899
2022-05-24 23:33:47 +02:00
Daniel Gustafsson
a8a1b666c4 ntlm: fix one more hostname test fallout
This fixup was missed in commit 5a41abef6d.

Closes: #8901
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
2022-05-24 12:51:28 +02:00
Daniel Gustafsson
5a41abef6d ntlm: copy NTLM_HOSTNAME to host buffer
Commit 709ae2454f added a fake hostname to avoid leaking the local
hostname, but omitted copying it to the host buffer.  Fix by copying
and adjust the test fallout.

Closes: #8895
Fixes: #8893
Reported-by: Patrick Monnerat <patrick@monnerat.net>
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
2022-05-22 23:26:24 +02:00
Daniel Stenberg
cb41a0169c
tests: update NTLM tests to use new host name
Also drop the debug requirement, remove the setenv sections, remove
prechecks and add NTLM to the top keywords.

Closes #8889
2022-05-20 16:24:13 +02:00
Balakrishnan Balasubramanian
dfa84a0450
socks: support unix sockets for socks proxy
Usage:
  curl -x "socks5h://localhost/run/tor/socks" "https://example.com"

Updated runtests.pl to run a socksd server listening on unix socket

Added tests test1467 test1468

Added documentation for proxy command line option and socks proxy
options

Closes #8668
2022-05-19 15:35:03 +02:00
Daniel Stenberg
b6487eb3d4
test1561: adjusted for the cookie fix 2022-05-19 14:48:26 +02:00
Daniel Stenberg
9ec22e4fe6
test414: verify secure cookie domain overlay 2022-05-19 14:48:26 +02:00
Daniel Gustafsson
d17db5713a test412/413: Use version macro for User-Agent
Commit 46d45ea3a incorrectly hardcoded the User-Agent in the test
output file which breaks when curlver is updated. Shift to using
the %VERSION macro instead.

Closes: #8856
2022-05-16 10:45:41 +02:00
Daniel Stenberg
3ead914303
test1635: verify --fail-with-body with --retry
Almost a dupe of 1634

Closes #8847
2022-05-16 10:04:21 +02:00
Daniel Stenberg
5227367903
test1919: verify CURLOPT_XOAUTH2_BEARER leak fix 2022-05-14 18:05:20 +02:00
Fabian Keil
75e9035921
tests 266, 116 and 1540: add a small write delay
This makes it more likely that the trailer is received
seperately from the last-chunk.

curl doesn't seem to care about this but it makes the tests
more useful when testing external proxies like Privoxy.
2022-05-11 11:14:18 +02:00
Fabian Keil
9e6ec8b6d5
tests 1117,1238,1523: adjust writedelay servercmds
... so the delays are the same now that the unit
is in milliseconds.
2022-05-11 11:14:18 +02:00
Daniel Stenberg
f8cb6c610a
test977: reproduce ability to set cookie on TLD
When PSL is not enabled
2022-05-09 16:47:28 +02:00
Daniel Stenberg
43cec1d4f8
test379: verify --remove-on-error with --no-clobber 2022-05-09 12:56:30 +02:00
Daniel Stenberg
ff3ee510c3
test440/441: verify HSTS with trailing dots 2022-05-09 12:54:39 +02:00
Daniel Stenberg
46d45ea3af
test412/413: verify alt-svc with trailing dots 2022-05-09 09:39:22 +02:00
Garrett Squire
652fd3fab8
hyper: fix test 357
This change fixes the hyper API such that PUT requests that receive a
417 response can retry without the Expect header.

Closes #8811
2022-05-08 23:19:05 +02:00
Daniel Stenberg
a8a1dd8ecc
http_proxy/hyper: handle closed connections
Enable test 1021 for hyper builds.

Patched-by: Prithvi MK
Fixes #8700
Closes #8806
2022-05-06 11:01:54 +02:00
Fabian Keil
6db4ef1242
test{898,974,976}: add 'HTTP proxy' keywords
... so the tests can be automatically skipped when
testing external HTTP proxies like Privoxy.

Closes #8791
2022-05-04 23:34:50 +02:00
Daniel Stenberg
685170b729
data/test376: set a proper name 2022-04-29 09:50:33 +02:00
Daniel Stenberg
cb60b2ccd7
test 898/974/976: require proxy to run
Fixes #8755
Reported-by: Marc Hörsken
Closes #8756
2022-04-27 00:51:12 +02:00
Liam Warfield
aad7d9f9a6
hyper: fix tests 580 and 581 for hyper
Hyper now has the ability to preserve header order. This commit adds a
few lines setting the connection options for this feature.

Related to issue #8617
Closes #8707
2022-04-25 17:33:08 +02:00
Daniel Stenberg
5295e8d64a
tests: verify the fix for CVE-2022-27774
- Test 973 redirects from HTTP to FTP, clear auth
 - Test 974 redirects from HTTP to HTTP different port, clear auth
 - Test 975 redirects from HTTP to FTP, permitted to keep auth
 - Test 976 redirects from HTTP to HTTP different port, permitted to keep
   auth
2022-04-25 16:24:33 +02:00
Daniel Stenberg
afe752e050
test898: verify the fix for CVE-2022-27776
Do not pass on Authorization headers on redirects to another port
2022-04-25 13:05:47 +02:00
Daniel Stenberg
a09a12806e
tool_getparam: error out on missing -K file
Add test 411 to verify.

Reported-by: Median Median Stride
Bug: https://hackerone.com/reports/1542881
Closes #8731
2022-04-25 11:38:50 +02:00
Daniel Stenberg
60452236fa
c_escape: escape '?' in generated --libcurl code
In order to avoid the risk of it being used in an accidental trigraph in
the generated code.

Reported-by: Harry Sintonen
Bug: https://hackerone.com/reports/1548535
Closes #8742
2022-04-25 00:29:22 +02:00
Daniel Stenberg
01a1697a79
curl: error out if -T and -d are used for the same URL
As one implies PUT and the other POST, both cannot be used
simultaneously.

Add test 378 to verify.

Reported-by: Boris Verkhovskiy
Fixes #8704
Closes #8715
2022-04-17 11:18:17 +02:00
Daniel Stenberg
36e09dc302
fail.d: tweak the description
Reviewed-by: Daniel Gustafsson
Suggested-by: Robert Charles Muir
Ref: https://twitter.com/rcmuir/status/1514915401574010887

Closes #8714
2022-04-15 23:50:35 +02:00
Daniel Stenberg
9e8c8b145b
data/DISABLED: disable test 313 on bearssl builds
Closes #8684
2022-04-07 08:36:35 +02:00
Daniel Stenberg
5a9d7c4e68
pop3/smtp: return *WEIRD_SERVER_REPLY when not understood
This leaves the CURLE_RECV_ERROR error code for explicit failure to
receive network data and allows users to better separate the problems.

Ref #8356
Reported-by: Rianov Viacheslav
Closes #8506
2022-03-29 14:01:53 +02:00
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