Commit Graph

5061 Commits

Author SHA1 Message Date
Daniel Stenberg
ef94c972bc
test681: verify --no-remote-name
Follow-up to 83ee5c428d (from #8931)

Closes #8942
2022-05-31 16:09:53 +02:00
Daniel Stenberg
472831256d
test680: require 'http' since it uses such a URL
Follow-up to d1b376c035
2022-05-31 13:14:28 +02:00
Daniel Stenberg
d1b376c035
test680: verify rejection of malformatted .netrc quoted password 2022-05-31 09:05:01 +02:00
Daniel Stenberg
19f981b4ff
test679: verify netrc quoted string 2022-05-31 09:05:01 +02:00
Daniel Stenberg
4d94fac9f0
headers api: remove EXPERIMENTAL tag
Closes #8900
2022-05-30 14:13:48 +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 Stenberg
8d86718f3f
opts: deprecate RANDOM_FILE and EGDSOCKET
These two options were only ever used for the OpenSSL backend for
versions before 1.1.0. They were never used for other backends and they
are not used with recent OpenSSL versions. They were never used much by
applications.

The defines RANDOM_FILE and EGD_SOCKET can still be set at build-time
for ancient EOL OpenSSL versions.

Closes #8670
2022-05-17 11:05:54 +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
Fabian Keil
fc3a0a872f
tests/server/sws.c: change the HTTP writedelay unit to milliseconds
This allows to use write delays for large responses without
resulting in the test taking an unreasonable amount of time.

In many cases delaying writes by a whole second or more isn't
necessary for the desired effect.

Closes #8827
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
cfa47974fe
libtest/lib1560: verify the host name percent decode fix 2022-05-09 12:50:41 +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
Daniel Gustafsson
5d3c57bfaa tests: fix markdown formatting in README
The asterisk in the abbreviation *NIX (for UNIX/Linux) needs to be
escaped to not mean start of italic formatting. This is consistent
with docs/RELEASE-PROCEDURE.md.

Closes: #8802
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
2022-05-05 16:43:38 +02:00
Fabian Keil
4f0bc19bc7 tests/server: declare variable 'reqlogfile' static
Silences the warning:

     CC       socksd-socksd.o
   socksd.c:143:13: warning: no previous extern declaration for
    non-static variable 'reqlogfile' [-Wmissing-variable-declarations]
   const char *reqlogfile = DEFAULT_REQFILE;
               ^
   socksd.c:143:7: note: declare 'static' if the variable is not
    intended to be used outside of this translation unit
   const char *reqlogfile = DEFAULT_REQFILE;
         ^
   1 warning generated.

... when compiling with clang 13.

Closes: #8799
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
2022-05-05 11:55:06 +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
Philip H
5e9a703cf2
misc: use "autoreconf -fi" instead buildconf
Signed-off-by: Philip H <47042125+pheiduck@users.noreply.github.com>
Closes #8777
2022-05-02 17:53:06 +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
4ec0549c39
misc: update copyright year ranges 2022-04-25 09:31:09 +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
25d7b5f39a
tests/FILEFORMAT.md: spellfix 2022-04-21 17:01:45 +02:00
Daniel Gustafsson
93cfed2b73 misc: fix typos
Fix a few random typos is comments and workflow names.
2022-04-21 09:43:35 +02:00
Gisle Vanem
6019d652b5 unit1620: call global_init before calling Curl_open
Curl_open calls the resolver init and on Windows if the resolver backend
is c-ares then the Windows sockets library (winsock) must already have
been initialized (via global init).

Ref: https://github.com/curl/curl/pull/8540#issuecomment-1059771800

Closes https://github.com/curl/curl/pull/8719
2022-04-20 02:26:43 -04:00
Marc Hoersken
68035af29d
timediff.[ch]: add curlx helper functions for timeval conversions
Also move timediff_t definitions from timeval.h to timediff.h and
then make timeval.h include the new standalone-capable timediff.h.

Reviewed-by: Jay Satiro
Reviewed-by: Daniel Stenberg

Supersedes #5888
Closes #8595
2022-04-17 13:11:27 +02:00
Balakrishnan Balasubramanian
80eb71a3f5
tests: refactor server/socksd.c to support --unix-socket
Closes #8687
2022-04-17 11:43:57 +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
Matteo Baccan
0a6eebfc14 perl: removed a double semicolon at end of line
Remove double semicolons at end of line in Perl code.

Closes: #8709
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
2022-04-14 13:55:32 +02:00
Daniel Stenberg
9e8c8b145b
data/DISABLED: disable test 313 on bearssl builds
Closes #8684
2022-04-07 08:36:35 +02:00