mirror of
https://github.com/curl/curl.git
synced 2026-04-14 23:01:41 +03:00
badwords: fix issues found in tests
There remain some false positives, hits in test data, and `dir` use, around 100 issues in total. There is no plan to enforce badwords on tests. Also: - badwords.txt: let a few `manpage[s]` occurrences through (in Perl code). Closes #19541
This commit is contained in:
parent
f0de14168a
commit
a87383828e
247 changed files with 594 additions and 595 deletions
4
.github/scripts/badwords.txt
vendored
4
.github/scripts/badwords.txt
vendored
|
|
@ -75,5 +75,5 @@ file names\b:filenames
|
|||
---WWW::Curl
|
||||
---NET::Curl
|
||||
---Curl Corporation
|
||||
\bmanpages[^./&:-]:man pages
|
||||
\bmanpage[^si./&:-]:man page
|
||||
\bmanpages[^./;=&{:-]:man pages
|
||||
\bmanpage[^si./;=&{:-]:man page
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ EXTRA_DIST = \
|
|||
valgrind.supp \
|
||||
$(TESTSCRIPTS)
|
||||
|
||||
# we have two variables here to make sure DIST_SUBDIRS won't get 'unit'
|
||||
# we have two variables here to make sure DIST_SUBDIRS does not get 'unit'
|
||||
# added twice as then targets such as 'distclean' misbehave and try to
|
||||
# do things twice in that subdir at times (and thus fails).
|
||||
if BUILD_UNITTESTS
|
||||
|
|
@ -108,7 +108,7 @@ curl:
|
|||
TEST_COMMON =
|
||||
|
||||
if CROSSCOMPILING
|
||||
TEST = @echo "NOTICE: we can't run the tests when cross-compiling!"
|
||||
TEST = @echo "NOTICE: we cannot run the tests when cross-compiling!"
|
||||
PYTEST = $(TEST)
|
||||
else # if not cross-compiling:
|
||||
|
||||
|
|
@ -124,8 +124,8 @@ TEST_F = -a -w -p -r
|
|||
TEST_T = -a -w -t -j20
|
||||
TEST_E = -a -w -e
|
||||
|
||||
# ~<keyword> means that it will run all tests matching the keyword, but will
|
||||
# ignore their results (since these ones are likely to fail for no good reason)
|
||||
# ~<keyword> means that it runs all tests matching the keyword, but ignores
|
||||
# their results (since these ones are likely to fail for no good reason)
|
||||
TEST_NF = -a -w -p ~flaky ~timing-dependent
|
||||
|
||||
# special target for CI use
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ our %pastversion;
|
|||
sub allversions {
|
||||
my ($file) = @_;
|
||||
open(A, "<$file") ||
|
||||
die "can't open the versions file $file\n";
|
||||
die "cannot open the versions file $file\n";
|
||||
my $before = 1;
|
||||
my $relcount;
|
||||
while(<A>) {
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ if(!$CAPREFIX) {
|
|||
} elsif(! -f "$CAPREFIX-ca.cacert" ||
|
||||
! -f "$CAPREFIX-ca.key") {
|
||||
|
||||
if($OPENSSL eq basename($OPENSSL)) { # has no dir component
|
||||
if($OPENSSL eq basename($OPENSSL)) { # has no directory component
|
||||
# find openssl in PATH
|
||||
my $found = 0;
|
||||
foreach(File::Spec->path()) {
|
||||
|
|
|
|||
|
|
@ -27,6 +27,6 @@ string_mask = utf8only
|
|||
countryName = "Country Name"
|
||||
countryName_value = NN
|
||||
organizationName = "Organization Name"
|
||||
organizationName_value = Edel Curl Arctic Illudium Research Cloud
|
||||
organizationName_value = Edel curl Arctic Illudium Research Cloud
|
||||
commonName = "Common Name"
|
||||
commonName_value = Northern Nowhere Trust Anchor
|
||||
|
|
|
|||
|
|
@ -29,6 +29,6 @@ string_mask = utf8only
|
|||
countryName = "Country Name is Northern Nowhere"
|
||||
countryName_value = NN
|
||||
organizationName = "Organization Name"
|
||||
organizationName_value = Edel Curl Arctic Illudium Research Cloud
|
||||
organizationName_value = Edel curl Arctic Illudium Research Cloud
|
||||
commonName = "Common Name"
|
||||
commonName_value = localhost
|
||||
|
|
|
|||
|
|
@ -29,6 +29,6 @@ string_mask = utf8only
|
|||
countryName = "Country Name is Northern Nowhere"
|
||||
countryName_value = NN
|
||||
organizationName = "Organization Name"
|
||||
organizationName_value = Edel Curl Arctic Illudium Research Cloud
|
||||
organizationName_value = Edel curl Arctic Illudium Research Cloud
|
||||
commonName = "Common Name"
|
||||
commonName_value = localhost
|
||||
|
|
|
|||
|
|
@ -29,6 +29,6 @@ string_mask = utf8only
|
|||
countryName = "Country Name is Northern Nowhere"
|
||||
countryName_value = NN
|
||||
organizationName = "Organization Name"
|
||||
organizationName_value = Edel Curl Arctic Illudium Research Cloud
|
||||
organizationName_value = Edel curl Arctic Illudium Research Cloud
|
||||
commonName = "Common Name"
|
||||
commonName_value = localhost.nn
|
||||
|
|
|
|||
|
|
@ -29,6 +29,6 @@ string_mask = utf8only
|
|||
countryName = "Country Name is Northern Nowhere"
|
||||
countryName_value = NN
|
||||
organizationName = "Organization Name"
|
||||
organizationName_value = Edel Curl Arctic Illudium Research Cloud
|
||||
organizationName_value = Edel curl Arctic Illudium Research Cloud
|
||||
commonName = "Common Name"
|
||||
commonName_value = localhost.nn
|
||||
|
|
|
|||
|
|
@ -29,6 +29,6 @@ string_mask = utf8only
|
|||
countryName = "Country Name is Northern Nowhere"
|
||||
countryName_value = NN
|
||||
organizationName = "Organization Name"
|
||||
organizationName_value = Edel Curl Arctic Illudium Research Cloud
|
||||
organizationName_value = Edel curl Arctic Illudium Research Cloud
|
||||
commonName = "Common Name"
|
||||
commonName_value = localhost.nn
|
||||
|
|
|
|||
|
|
@ -29,6 +29,6 @@ string_mask = utf8only
|
|||
countryName = "Country Name is Northern Nowhere"
|
||||
countryName_value = NN
|
||||
organizationName = "Organization Name"
|
||||
organizationName_value = Edel Curl Arctic Illudium Research Cloud
|
||||
organizationName_value = Edel curl Arctic Illudium Research Cloud
|
||||
commonName = "Common Name"
|
||||
commonName_value = localhost
|
||||
|
|
|
|||
|
|
@ -30,6 +30,6 @@ string_mask = utf8only
|
|||
countryName = "Country Name is Northern Nowhere"
|
||||
countryName_value = NN
|
||||
organizationName = "Organization Name"
|
||||
organizationName_value = Edel Curl Arctic Illudium Research Cloud
|
||||
organizationName_value = Edel curl Arctic Illudium Research Cloud
|
||||
commonName = "Common Name"
|
||||
commonName_value = localhost
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ LC_ALL=C.UTF-8
|
|||
HTTP over proxy with malformatted IDN hostname
|
||||
</name>
|
||||
|
||||
# This host name contains an invalid UTF-8 byte sequence that can't be
|
||||
# This hostname contains an invalid UTF-8 byte sequence that cannot be
|
||||
# converted into an IDN name
|
||||
<stdin>
|
||||
url = "http://invalid-utf8-%hex[%e2%90]hex%.local/page/%TESTNUMBER"
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ FTP PASV upload resume from end of file
|
|||
ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -T %LOGDIR/upload%TESTNUMBER -C -
|
||||
</command>
|
||||
<file name="%LOGDIR/upload%TESTNUMBER">
|
||||
this is the *****cr@p******** that we're gonna upload
|
||||
this is the *****cr@p******** that we are gonna upload
|
||||
|
||||
worx?
|
||||
</file>
|
||||
|
|
@ -45,7 +45,7 @@ APPE %TESTNUMBER
|
|||
QUIT
|
||||
</protocol>
|
||||
<upload>
|
||||
cr@p******** that we're gonna upload
|
||||
cr@p******** that we are gonna upload
|
||||
|
||||
worx?
|
||||
</upload>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ FTP PASV upload resume from end of empty file
|
|||
ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -T %LOGDIR/upload%TESTNUMBER -C -
|
||||
</command>
|
||||
<file name="%LOGDIR/upload%TESTNUMBER">
|
||||
this is the *****cr@p******** that we're gonna upload
|
||||
this is the *****cr@p******** that we are gonna upload
|
||||
|
||||
worx?
|
||||
</file>
|
||||
|
|
@ -45,7 +45,7 @@ STOR %TESTNUMBER
|
|||
QUIT
|
||||
</protocol>
|
||||
<upload>
|
||||
this is the *****cr@p******** that we're gonna upload
|
||||
this is the *****cr@p******** that we are gonna upload
|
||||
|
||||
worx?
|
||||
</upload>
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ http://%HOSTIP:%HTTPPORT/%TESTNUMBER -T%LOGDIR/test%TESTNUMBER.txt -C -
|
|||
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
# curl doesn't do a HEAD request on the remote file so it has no idea whether
|
||||
# curl does not do a HEAD request on the remote file so it has no idea whether
|
||||
# it can skip part of the file or not. Instead, it sends the entire file.
|
||||
<protocol crlf="headers">
|
||||
PUT /%TESTNUMBER HTTP/1.1
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ ftp://test-number:%TESTNUMBER/wanted/page -p -x %HOSTIP:%HTTPPORT
|
|||
#
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
# The server doesn't implement CONNECT for ftp, so this must be a failure test
|
||||
# The server does not implement CONNECT for ftp, so this must be a failure test
|
||||
<errorcode>
|
||||
56
|
||||
</errorcode>
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ HTTP 1.0 PUT from stdin with no content length
|
|||
http://%HOSTIP:%HTTPPORT/bzz/%TESTNUMBER -T - -0
|
||||
</command>
|
||||
<stdin>
|
||||
this data can't be sent
|
||||
this data cannot be sent
|
||||
</stdin>
|
||||
</client>
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ PASS ftp@example.com
|
|||
PWD
|
||||
PRET RETR %TESTNUMBER
|
||||
</protocol>
|
||||
# we expect that the server doesn't understand PRET
|
||||
# we expect that the server does not understand PRET
|
||||
<errorcode>
|
||||
84
|
||||
</errorcode>
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@ ftp
|
|||
FTP PASV upload resume
|
||||
</name>
|
||||
<command>
|
||||
ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -T %LOGDIR/upload%TESTNUMBER -C 40
|
||||
ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -T %LOGDIR/upload%TESTNUMBER -C 41
|
||||
</command>
|
||||
<file name="%LOGDIR/upload%TESTNUMBER">
|
||||
this is the *****crap******** that we're gonna upload
|
||||
this is the *****crap******** that we are gonna upload
|
||||
|
||||
worx?
|
||||
</file>
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ void startfunc(int a, int b) {
|
|||
|
||||
// CPP comment ?
|
||||
|
||||
/* comment doesn't end
|
||||
/* comment does not end
|
||||
|
||||
</file>
|
||||
</client>
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ FTP PORT download, no data conn and no transient negative reply
|
|||
s/^EPRT \|1\|(\S*)/EPRT \|1\|/
|
||||
</strippart>
|
||||
|
||||
# This test doesn't send a QUIT because the main state machine in multi.c
|
||||
# This test does not send a QUIT because the main state machine in multi.c
|
||||
# triggers the timeout and sets the CURLE_OPERATION_TIMEDOUT error (28) for
|
||||
# which the FTP disconnect code generically has to assume could mean the
|
||||
# control the connection and thus it cannot send any command.
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ cookies
|
|||
</keywords>
|
||||
</info>
|
||||
|
||||
# This test is very similar to 1216, only that it sets the cookies from the
|
||||
# This test is similar to 1216, only that it sets the cookies from the
|
||||
# first site instead of reading from a file
|
||||
<reply>
|
||||
<data crlf="headers">
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ connect to non-listen
|
|||
# Server-side
|
||||
<reply>
|
||||
<servercmd>
|
||||
# Assuming there's nothing listening on port 1
|
||||
# Assuming there is nothing listening on port 1
|
||||
REPLY EPSV 229 Entering Passive Mode (|||1|)
|
||||
</servercmd>
|
||||
<data>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ DELAY
|
|||
<servercmd>
|
||||
writedelay: 2000
|
||||
</servercmd>
|
||||
# ~1200 bytes (so that they don't fit in two 512 byte chunks)
|
||||
# ~1200 bytes (so that they do not fit in two 512 byte chunks)
|
||||
<data nocheck="yes">
|
||||
012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
|
||||
</data>
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ Funny-head: yesyes
|
|||
http
|
||||
</server>
|
||||
|
||||
# make sure there's no Expect: 100-continue when there's no file to send!
|
||||
# make sure there is no Expect: 100-continue when there is no file to send!
|
||||
<name>
|
||||
HTTP with zero size file PUT
|
||||
</name>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ Provide illegal proxy name
|
|||
#
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
# Couldn't resolve proxy name
|
||||
# Could not resolve proxy name
|
||||
<errorcode>
|
||||
5
|
||||
</errorcode>
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ Connection: close
|
|||
Content-Type: text/html
|
||||
Funny-head: yesyes
|
||||
|
||||
These data aren't actually sent to the client
|
||||
These data are not actually sent to the client
|
||||
</data>
|
||||
</reply>
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ red.onion
|
|||
#
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
# Couldn't resolve host name
|
||||
# Could not resolve hostname
|
||||
<errorcode>
|
||||
6
|
||||
</errorcode>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ tasty.onion.
|
|||
#
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
# Couldn't resolve host name
|
||||
# Could not resolve hostname
|
||||
<errorcode>
|
||||
6
|
||||
</errorcode>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ FILE
|
|||
file
|
||||
</server>
|
||||
<name>
|
||||
file:// don't overwrite self with --skip-existing
|
||||
file:// do not overwrite self with --skip-existing
|
||||
</name>
|
||||
<command option="no-output">
|
||||
file://localhost%FILE_PWD/%LOGDIR/test%TESTNUMBER.txt -o %LOGDIR/test%TESTNUMBER.txt --skip-existing
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ HTTP/1.0 401 BAD BOY
|
|||
Server: swsclose
|
||||
Content-Type: text/html
|
||||
|
||||
This contains a response code >= 400, so curl shouldn't display this. Even
|
||||
though it's a response code that triggers authentication, we're not using
|
||||
This contains a response code >= 400, so curl should not display this. Even
|
||||
though it is a response code that triggers authentication, we are not using
|
||||
authentication so we should still fail.
|
||||
</data>
|
||||
</reply>
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ lib%TESTNUMBER
|
|||
return failure immediately from progress callback
|
||||
</name>
|
||||
|
||||
# this server/host won't be used for real
|
||||
# this server/host will not be used for real
|
||||
<command>
|
||||
http://%HOSTIP:%HTTPPORT/%TESTNUMBER
|
||||
</command>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ resolve
|
|||
</info>
|
||||
|
||||
<reply>
|
||||
# Close the connection after the first request but don't tell the client to do
|
||||
# Close the connection after the first request but do not tell the client to do
|
||||
# so! When starting the second request it'll detect a dead connection and must
|
||||
# not clean the DNS entries added manually.
|
||||
<data1>
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ HTTP/1.0 401 BAD BOY
|
|||
Server: swsclose
|
||||
Content-Type: text/html
|
||||
|
||||
This contains a response code >= 400, so curl shouldn't display this. Even
|
||||
though it's a response code that triggers authentication, we're not using
|
||||
This contains a response code >= 400, so curl should not display this. Even
|
||||
though it is a response code that triggers authentication, we are not using
|
||||
authentication so we should still fail.
|
||||
</data>
|
||||
</reply>
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ IMAP cleanup before a connection was created
|
|||
lib%TESTNUMBER
|
||||
</tool>
|
||||
|
||||
# this MUST use a host name that doesn't resolve
|
||||
# this MUST use a hostname that does not resolve
|
||||
<command>
|
||||
imap://non-existing-host.haxx.se:%IMAPPORT/%TESTNUMBER
|
||||
</command>
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ lib%TESTNUMBER
|
|||
verify api is protected against calls from callbacks
|
||||
</name>
|
||||
|
||||
# this server/host won't be used for real
|
||||
# this server/host will not be used for real
|
||||
<command>
|
||||
http://%HOSTIP:%HTTPPORT/%TESTNUMBER
|
||||
</command>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ lib%TESTNUMBER
|
|||
</tool>
|
||||
|
||||
<name>
|
||||
Remove easy handle in pending connections doesn't leave dangling entry
|
||||
Remove easy handle in pending connections does not leave dangling entry
|
||||
</name>
|
||||
<command>
|
||||
hostname.invalid
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ https
|
|||
https
|
||||
</killserver>
|
||||
<name>
|
||||
Cookies set over HTTP can't override secure ones
|
||||
Cookies set over HTTP cannot override secure ones
|
||||
</name>
|
||||
<command>
|
||||
--insecure https://%HOSTIP:%HTTPSPORT/%TESTNUMBER0001 -L -c %LOGDIR/jar%TESTNUMBER.txt -H "Host: www.example.com" http://%HOSTIP:%HTTPPORT/%TESTNUMBER0002 -L -c %LOGDIR/jar%TESTNUMBER.txt -H "Host: www.example.com"
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ timing-dependent
|
|||
lib%TESTNUMBER
|
||||
</tool>
|
||||
<name>
|
||||
HTTP request, remove handle while resolving, don't block
|
||||
HTTP request, remove handle while resolving, do not block
|
||||
</name>
|
||||
|
||||
<command>
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
|
|||
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
# This doesn't send QUIT because of known bug:
|
||||
# This does not send QUIT because of known bug:
|
||||
# "7.8 Premature transfer end but healthy control channel"
|
||||
<protocol crlf="yes">
|
||||
USER anonymous
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@ Proxy-Authenticate: Basic realm="Squid proxy-caching web server"
|
|||
Server: swsclose
|
||||
Content-Type: text/html
|
||||
|
||||
Even though it's the response code that triggers authentication, we're
|
||||
using NTLM and the server isn't, so we should fail. We know the server
|
||||
isn't because there's no Proxy-Authorization: NTLM header
|
||||
Even though it is the response code that triggers authentication, we are
|
||||
using NTLM and the server is not, so we should fail. We know the server
|
||||
is not because there is no Proxy-Authorization: NTLM header
|
||||
</data1001>
|
||||
</reply>
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ proxy
|
|||
<verify>
|
||||
|
||||
# The second CONNECT will be made to the dynamic port number the FTP server
|
||||
# opens for us, so we can't compare with a known pre-existing number!
|
||||
# opens for us, so we cannot compare with a known pre-existing number!
|
||||
<strippart>
|
||||
s/((https.proxy):(\d+))/$2:12345/
|
||||
</strippart>
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ proxy
|
|||
<verify>
|
||||
|
||||
# The second and third CONNECT will be made to the dynamic port number the FTP
|
||||
# server opens for us, so we can't compare with known pre-existing numbers!
|
||||
# server opens for us, so we cannot compare with known pre-existing numbers!
|
||||
|
||||
<strippart>
|
||||
s/((https.proxy):(\d+))/$2:12345/
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ Content-Length: 15
|
|||
http
|
||||
</server>
|
||||
<name>
|
||||
HTTP GET with resume and redirect (to a page that doesn't resume)
|
||||
HTTP GET with resume and redirect (to a page that does not resume)
|
||||
</name>
|
||||
<command>
|
||||
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -C 50 -L
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ http://%HOSTIP:%NOLISTENPORT/not-there/%TESTNUMBER
|
|||
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
# 7 CURLE_COULDNT_CONNECT (expected since there's nothing listening there)
|
||||
# 7 CURLE_COULDNT_CONNECT (expected since there is nothing listening there)
|
||||
# 42 CURLE_ABORTED_BY_CALLBACK
|
||||
<errorcode>
|
||||
42
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ hello
|
|||
# Client-side
|
||||
<client>
|
||||
|
||||
# require HTTP too as otherwise CURLOPT_POST doesn't exist
|
||||
# require HTTP too as otherwise CURLOPT_POST does not exist
|
||||
<features>
|
||||
mqtt
|
||||
http
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ HTTP Digest auth
|
|||
<reply>
|
||||
|
||||
<!-- Alternate the order that Basic and Digest headers appear in responses to
|
||||
ensure that the order doesn't matter. -->
|
||||
ensure that the order does not matter. -->
|
||||
|
||||
<!-- First request has Basic auth, wrong password -->
|
||||
<data100 crlf="headers">
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ NTLM
|
|||
<reply>
|
||||
|
||||
<!-- Alternate the order that Basic and NTLM headers appear in responses to
|
||||
ensure that the order doesn't matter. -->
|
||||
ensure that the order does not matter. -->
|
||||
|
||||
<!-- First request has Basic auth, wrong password -->
|
||||
<data100 crlf="headers">
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ HTTP Digest auth
|
|||
<reply>
|
||||
|
||||
<!-- Alternate the order that Basic and Digest headers appear in responses to
|
||||
ensure that the order doesn't matter. -->
|
||||
ensure that the order does not matter. -->
|
||||
|
||||
<!-- First request has Digest auth, wrong password -->
|
||||
<data100 crlf="headers">
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ HTTP Digest auth
|
|||
|
||||
Explanation for the duplicate 400 requests:
|
||||
|
||||
libcurl doesn't detect that a given Digest password is wrong already on the
|
||||
libcurl does not detect that a given Digest password is wrong already on the
|
||||
first 401 response (as the data400 gives). libcurl will instead consider the
|
||||
new response just as a duplicate and it sends another and detects the auth
|
||||
problem on the second 401 response!
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ NTLM
|
|||
<reply>
|
||||
|
||||
<!-- Alternate the order that Digest and NTLM headers appear in responses to
|
||||
ensure that the order doesn't matter. -->
|
||||
ensure that the order does not matter. -->
|
||||
|
||||
<!-- First request has Digest auth, wrong password -->
|
||||
<data100 crlf="headers">
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ NTLM
|
|||
<reply>
|
||||
|
||||
<!-- Alternate the order that Basic and NTLM headers appear in responses to
|
||||
ensure that the order doesn't matter. -->
|
||||
ensure that the order does not matter. -->
|
||||
|
||||
<!-- First request has NTLM auth, wrong password -->
|
||||
<data100 crlf="headers">
|
||||
|
|
|
|||
|
|
@ -12,13 +12,13 @@ NTLM
|
|||
<reply>
|
||||
|
||||
<!-- Alternate the order that Digest and NTLM headers appear in responses to
|
||||
ensure that the order doesn't matter. -->
|
||||
ensure that the order does not matter. -->
|
||||
|
||||
<!--
|
||||
|
||||
Explanation for the duplicate 400 requests:
|
||||
|
||||
libcurl doesn't detect that a given Digest password is wrong already on the
|
||||
libcurl does not detect that a given Digest password is wrong already on the
|
||||
first 401 response (as the data400 gives). libcurl will instead consider the
|
||||
new response just as a duplicate and it sends another and detects the auth
|
||||
problem on the second 401 response!
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ mqtt
|
|||
mqtt
|
||||
</server>
|
||||
<name>
|
||||
MQTT with very long user name
|
||||
MQTT with 64 KiB long username
|
||||
</name>
|
||||
<file name="%LOGDIR/input%TESTNUMBER">
|
||||
user = %repeat[65536 x a]%:fakepasswd
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ ws://%HOSTIP:%HTTPPORT/%TESTNUMBER
|
|||
</client>
|
||||
|
||||
#
|
||||
# PONG with no data and the 32 bit mask
|
||||
# PONG with no data and the 32-bit mask
|
||||
#
|
||||
<verify>
|
||||
<protocol crlf="yes" nonewline="yes" nocheck="yes">
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ ws://%HOSTIP:%HTTPPORT/%TESTNUMBER
|
|||
</client>
|
||||
|
||||
#
|
||||
# PONG with no data and the 32 bit mask
|
||||
# PONG with no data and the 32-bit mask
|
||||
#
|
||||
<verify>
|
||||
<protocol crlf="headers" nocheck="yes">
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ FTP resumed upload but no file present remotely
|
|||
ftp://%HOSTIP:%FTPPORT/%TESTNUMBER -T %LOGDIR/upload%TESTNUMBER -C -
|
||||
</command>
|
||||
<file name="%LOGDIR/upload%TESTNUMBER">
|
||||
this is the *****crap******** that we're gonna upload
|
||||
this is the *****crap******** that we are gonna upload
|
||||
|
||||
worx?
|
||||
</file>
|
||||
|
|
@ -44,7 +44,7 @@ STOR %TESTNUMBER
|
|||
QUIT
|
||||
</protocol>
|
||||
<upload>
|
||||
this is the *****crap******** that we're gonna upload
|
||||
this is the *****crap******** that we are gonna upload
|
||||
|
||||
worx?
|
||||
</upload>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ HTTP GET
|
|||
HTTP/1.0 404 BAD BOY
|
||||
Content-Type: text/html
|
||||
|
||||
This silly page doesn't reaaaaaly exist so you should not get it.
|
||||
This silly page does not reaaaaaly exist so you should not get it.
|
||||
</data>
|
||||
</reply>
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ HTTP proxy Digest auth
|
|||
</info>
|
||||
# Server-side
|
||||
<reply>
|
||||
# The stupid test server doesn't response anything at all until the full
|
||||
# The stupid test server does not response anything at all until the full
|
||||
# request has been sent, and then of course the full POST has already been
|
||||
# sent!
|
||||
<data>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ HTTP proxy Digest auth
|
|||
</info>
|
||||
# Server-side
|
||||
<reply>
|
||||
# The stupid test server doesn't response anything at all until the full
|
||||
# The stupid test server does not response anything at all until the full
|
||||
# request has been sent, and then of course the full POST has already been
|
||||
# sent!
|
||||
<data>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ file
|
|||
<name>
|
||||
GET a directory using file://
|
||||
</name>
|
||||
<!-- doesn't work on win32, see #6379 -->
|
||||
<!-- does not work on win32, see #6379 -->
|
||||
<features>
|
||||
!win32
|
||||
</features>
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ Connection: close
|
|||
Content-Type: text/html
|
||||
Funny-head: yesyes
|
||||
|
||||
These data aren't actually sent to the client
|
||||
These data are not actually sent to the client
|
||||
</data>
|
||||
</reply>
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ file
|
|||
<name>
|
||||
GET a directory using file://
|
||||
</name>
|
||||
<!-- doesn't work on win32, see #6379 -->
|
||||
<!-- does not work on win32, see #6379 -->
|
||||
<features>
|
||||
!win32
|
||||
</features>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ Q- What did 0 say to 8? A- Nice Belt!
|
|||
http
|
||||
</server>
|
||||
|
||||
# we're actually more interested in any compression support but this is the
|
||||
# we are actually more interested in any compression support but this is the
|
||||
# best we can do right now
|
||||
<features>
|
||||
libz
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ REPLY SIZE 500 no such command
|
|||
ftp
|
||||
</server>
|
||||
<name>
|
||||
FTP range download when SIZE doesn't work
|
||||
FTP range download when SIZE does not work
|
||||
</name>
|
||||
<command>
|
||||
ftp://%HOSTIP:%FTPPORT/%TESTNUMBER --range 3-6
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ HTTP GET
|
|||
HTTP/1.0 404 BAD BOY swsclose
|
||||
Content-Type: text/html
|
||||
|
||||
This silly page doesn't reaaaaaly exist so you should not get it.
|
||||
This silly page does not reaaaaaly exist so you should not get it.
|
||||
</data>
|
||||
</reply>
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ Expect: 100-continue
|
|||
</info>
|
||||
# Server-side
|
||||
<reply>
|
||||
# 417 means the server didn't like the Expect header
|
||||
# 417 means the server did not like the Expect header
|
||||
<data>
|
||||
HTTP/1.1 417 BAD swsbounce
|
||||
Date: Tue, 09 Nov 2010 14:49:00 GMT
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ HTTP GET
|
|||
HTTP/1.0 404 BAD BOY swsclose
|
||||
Content-Type: text/html
|
||||
|
||||
This silly page doesn't reaaaaaly exist so you should not get it.
|
||||
This silly page does not reaaaaaly exist so you should not get it.
|
||||
</data>
|
||||
</reply>
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ local-http
|
|||
<command>
|
||||
-4 http://curlmachine.localhost:%HTTPPORT/%TESTNUMBER
|
||||
</command>
|
||||
# Ensure that we're running on localhost
|
||||
# Ensure that we are running on localhost
|
||||
</client>
|
||||
|
||||
#
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ SSL
|
|||
https
|
||||
</server>
|
||||
<name>
|
||||
HTTPS GET with very long request header
|
||||
HTTPS GET with 49 KB long request header
|
||||
</name>
|
||||
# 14 characters repeated 3500 times makes 49000 bytes
|
||||
<file name="%LOGDIR/file%TESTNUMBER">
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ run 3: overwrite cookie 1 and 4, set cookie 6 with and without tailmatch
|
|||
<server>
|
||||
http
|
||||
</server>
|
||||
# don't run this with the threaded-resolver or c-ares since the events might
|
||||
# do not run this with the threaded-resolver or c-ares since the events might
|
||||
# trigger in a different order!
|
||||
<features>
|
||||
!threaded-resolver
|
||||
|
|
|
|||
|
|
@ -30,9 +30,9 @@ curl_getdate() testing
|
|||
|
||||
# This test case previously tested an overflow case ("2094 Nov 6 =>
|
||||
# 2147483647") for 32-bit time_t, but since some systems have 64-bit time_t and
|
||||
# handles this (returning 3939840000), and some 64-bit time_t systems don't
|
||||
# handle this and return -1 for this, it turned very tricky to write a fine
|
||||
# test case and thus it is now removed until we have a way to write test cases
|
||||
# handles this (returning 3939840000), and some 64-bit time_t systems do not
|
||||
# handle this and return -1 for this, it turned tricky to write a fine test
|
||||
# case and thus it is now removed until we have a way to write test cases
|
||||
# for this kind of things.
|
||||
|
||||
</verify>
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ ftp://%HOSTIP:%FTPPORT/path/%TESTNUMBER %LOGDIR/upload%TESTNUMBER
|
|||
</command>
|
||||
<file name="%LOGDIR/upload%TESTNUMBER">
|
||||
Moooooooooooo
|
||||
don't upload this
|
||||
do not upload this
|
||||
</file>
|
||||
</client>
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ ftp://%HOSTIP:%FTPPORT/%TESTNUMBER
|
|||
|
||||
# Verify data after the test has been "shot"
|
||||
#
|
||||
# There's no MTDM in the protocol here since this code doesn't ask for the
|
||||
# There is no MTDM in the protocol here since this code does not ask for the
|
||||
# time/date of the file
|
||||
<verify>
|
||||
<protocol crlf="yes">
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ curl_easy_escape
|
|||
|
||||
# Verify data after the test has been "shot"
|
||||
#
|
||||
# There's no MTDM in the protocol here since this code doesn't ask for the
|
||||
# There is no MTDM in the protocol here since this code does not ask for the
|
||||
# time/date of the file
|
||||
<verify>
|
||||
<stdout>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ lib%TESTNUMBER
|
|||
FTP a type=A URL and CURLOPT_PORT set
|
||||
</name>
|
||||
|
||||
# note that we need quotes around the URL below to make sure the shell doesn't
|
||||
# note that we need quotes around the URL below to make sure the shell does not
|
||||
# treat the semicolon as a separator!
|
||||
<command>
|
||||
'ftp://%HOSTIP:23456/%TESTNUMBER;type=A' %FTPPORT
|
||||
|
|
@ -36,7 +36,7 @@ FTP a type=A URL and CURLOPT_PORT set
|
|||
|
||||
# Verify data after the test has been "shot"
|
||||
#
|
||||
# There's no MTDM in the protocol here since this code doesn't ask for the
|
||||
# There is no MTDM in the protocol here since this code does not ask for the
|
||||
# time/date of the file
|
||||
<verify>
|
||||
<protocol crlf="yes">
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ proxy
|
|||
<setenv>
|
||||
ftp_proxy=http://%HOSTIP:%HTTPPORT/
|
||||
</setenv>
|
||||
# note that we need quotes around the URL below to make sure the shell doesn't
|
||||
# note that we need quotes around the URL below to make sure the shell does not
|
||||
# treat the semicolon as a separator!
|
||||
<command>
|
||||
"ftp://%HOSTIP:23456/%TESTNUMBER;type=A" %FTPPORT
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ lib%TESTNUMBER
|
|||
</tool>
|
||||
|
||||
<name>
|
||||
small chunked HTTP POSTs with digest auth. and progress callback
|
||||
small chunked HTTP POSTs with digest auth and progress callback
|
||||
</name>
|
||||
<command>
|
||||
http://%HOSTIP:%HTTPPORT/%TESTNUMBER %LOGDIR/ip%TESTNUMBER
|
||||
|
|
|
|||
|
|
@ -25,9 +25,9 @@ SFTP with multi interface, remove handle early
|
|||
</name>
|
||||
|
||||
# The command here uses 'localhost' just to make sure that curl_multi_perform
|
||||
# won't reach too far in the first invoke. When using c-ares at least, the
|
||||
# name resolve will cause it to return rather quickly and thus we could trigger
|
||||
# the problem we're looking to verify.
|
||||
# does not reach too far in the first invoke. When using c-ares at least, the
|
||||
# name resolve causes it to return rather quickly and thus we could trigger
|
||||
# the problem we are looking to verify.
|
||||
<command>
|
||||
sftp://localhost:%SSHPORT%SFTP_PWD/%LOGDIR/upload%TESTNUMBER.txt %USER: %LOGDIR/server/curl_client_key.pub %LOGDIR/server/curl_client_key
|
||||
</command>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<testcase>
|
||||
#
|
||||
# This test is exactly like 525 but the server rejects the EPRT command.
|
||||
# Written up to make sure that there's nothing in the multi interface
|
||||
# Written up to make sure that there is nothing in the multi interface
|
||||
# active connection case that differs between PORT and EPRT use
|
||||
#
|
||||
<info>
|
||||
|
|
@ -32,7 +32,7 @@ ftp
|
|||
lib525
|
||||
</tool>
|
||||
<name>
|
||||
FTP PORT upload using multi interface, EPRT doesn't work
|
||||
FTP PORT upload using multi interface, EPRT does not work
|
||||
</name>
|
||||
<command>
|
||||
ftp://%HOSTIP:%FTPPORT/path/%TESTNUMBER %LOGDIR/upload%TESTNUMBER
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ lib%TESTNUMBER
|
|||
<command>
|
||||
https://localhost:%HTTPSPORT/%TESTNUMBER %CERTDIR/certs/test-ca.crt
|
||||
</command>
|
||||
# Ensure that we're running on localhost because we're checking the host name
|
||||
# Ensure that we are running on localhost because we are checking the hostname
|
||||
<precheck>
|
||||
%LIBTESTS lib%TESTNUMBER check
|
||||
</precheck>
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ http
|
|||
SOCKS5 proxy auth
|
||||
</name>
|
||||
|
||||
# target a port that won't work without the SOCKS magic
|
||||
# target a port that does not work without the SOCKS magic
|
||||
<command>
|
||||
http://%HOSTIP:1/%TESTNUMBER -x socks5://uz3r:p4ssworm@%HOSTIP:%SOCKSPORT
|
||||
</command>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ http
|
|||
</server>
|
||||
<setenv>
|
||||
#
|
||||
# Set a home that doesn't have a ".ipfs" folder. %PWD should be good.
|
||||
# Set a home that does not have a ".ipfs" folder. %PWD should be good.
|
||||
# This is to prevent the automatic gateway detection from finding a gateway file in your home folder.
|
||||
HOME=%PWD
|
||||
</setenv>
|
||||
|
|
@ -34,7 +34,7 @@ ipfs://bafybeidecnvkrygux6uoukouzps5ofkeevoqland7kopseiod6pzqvjg7u
|
|||
</client>
|
||||
|
||||
#
|
||||
# Verify with no gateway url and no auto detection
|
||||
# Verify with no gateway URL and no auto detection
|
||||
<verify>
|
||||
<errorcode>
|
||||
37
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ http
|
|||
socks4
|
||||
</server>
|
||||
<name>
|
||||
SOCKS4 with very long proxy user name
|
||||
SOCKS4 with long proxy username
|
||||
</name>
|
||||
<command>
|
||||
http://fake --limit-rate 1 -x socks4a://%repeat[1015 x a]%@%HOSTIP:%SOCKSPORT
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ ipfs
|
|||
http
|
||||
</server>
|
||||
<name>
|
||||
IPNS path and query args for gateway and IPFS url (malformed gateway url)
|
||||
IPNS path and query args for gateway and IPFS URL (malformed gateway URL)
|
||||
</name>
|
||||
<command>
|
||||
--ipfs-gateway "http://%HOSTIP:%HTTPPORT/some/path?biz=baz" "ipns://fancy.tld/a/b?foo=bar&aaa=bbb"
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ http
|
|||
SOCKS5-hostname with max length credentials and max hostname length
|
||||
</name>
|
||||
|
||||
# target a port that won't work without the SOCKS magic
|
||||
# target a port that does not work without the SOCKS magic
|
||||
<command>
|
||||
http://%repeat[254 x c]%:%HTTPPORT -x socks5h://%repeat[255 x a]%:%repeat[255 x b]%@%HOSTIP:%SOCKSPORT
|
||||
</command>
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ Funny-head: yesyes
|
|||
http
|
||||
</server>
|
||||
<name>
|
||||
--retry and -f on a HTTP 404 response
|
||||
--retry and -f on an HTTP 404 response
|
||||
</name>
|
||||
<command>
|
||||
http://%HOSTIP:%HTTPPORT/%TESTNUMBER -f --retry 1
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ body
|
|||
imap
|
||||
</server>
|
||||
<name>
|
||||
IMAP doesn't perform SELECT if reusing the same mailbox
|
||||
IMAP does not perform SELECT if reusing the same mailbox
|
||||
</name>
|
||||
<command>
|
||||
'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=123/;SECTION=1' 'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=456/;SECTION=2.3' -u user:secret
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ body
|
|||
imap
|
||||
</server>
|
||||
<name>
|
||||
IMAP custom request doesn't check continuation data
|
||||
IMAP custom request does not check continuation data
|
||||
</name>
|
||||
<command>
|
||||
imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/ -u user:secret -X 'FETCH 123 BODY[1]'
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ IMAP OAuth 2.0 (OAUTHBEARER) authentication
|
|||
<command>
|
||||
'imap://%HOSTIP:%IMAPPORT/%TESTNUMBER/;MAILINDEX=1' -u user --oauth2-bearer mF_9.B5f-4.1JqM
|
||||
</command>
|
||||
# The protocol section doesn't support ways of specifying the raw data in the
|
||||
# The protocol section does not support ways of specifying the raw data in the
|
||||
# base64 encoded message so we must assert this
|
||||
</client>
|
||||
|
||||
|
|
|
|||
|
|
@ -46,8 +46,7 @@ urlglob with out of range -o #[num] usage
|
|||
|
||||
#
|
||||
# Verify data after the test has been "shot". Note that the command line
|
||||
# will write both responses into the same file name so only the second
|
||||
# survives
|
||||
# writes both responses into the same filename so only the second survives
|
||||
#
|
||||
<verify>
|
||||
<file name="%LOGDIR/dumpit%TESTNUMBER-#2.dump" crlf="headers">
|
||||
|
|
|
|||
|
|
@ -24,13 +24,13 @@
|
|||
###########################################################################
|
||||
|
||||
# This script is intended for developers to test some internals of the
|
||||
# runtests.pl harness. Don't try to use this unless you know what you're
|
||||
# runtests.pl harness. Do not try to use this unless you know what you are
|
||||
# doing!
|
||||
|
||||
# An example command-line that starts a test http server for test 11 and waits
|
||||
# for the user before stopping it:
|
||||
# ./devtest.pl --verbose serverfortest https echo "Started https" protoport https preprocess 11 pause echo Stopping stopservers echo Done
|
||||
# curl can connect to the server while it's running like this:
|
||||
# curl can connect to the server while it is running like this:
|
||||
# curl -vkL https://localhost:<protoport>/11
|
||||
|
||||
use strict;
|
||||
|
|
@ -94,7 +94,7 @@ sub parseprotocols {
|
|||
|
||||
# Generate a "proto-ipv6" version of each protocol to match the
|
||||
# IPv6 <server> name and a "proto-unix" to match the variant which
|
||||
# uses Unix domain sockets. This works even if support isn't
|
||||
# uses Unix domain sockets. This works even if support is not
|
||||
# compiled in because the <features> test will fail.
|
||||
push @protocols, map(("$_-ipv6", "$_-unix"), @protocols);
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#
|
||||
|
||||
# Run some tests against servers we know to support ECH (CF, defo.ie, etc.).
|
||||
# as well as some we know don't do ECH but have an HTTPS RR, and finally some
|
||||
# as well as some we know do not do ECH but have an HTTPS RR, and finally some
|
||||
# for which neither is the case.
|
||||
|
||||
# TODO: Translate this into something that approximates a valid curl test:-)
|
||||
|
|
@ -36,9 +36,9 @@
|
|||
|
||||
# set -x
|
||||
|
||||
# Exit with an error if there's an active ech stanza in ~/.curlrc
|
||||
# as that'd likely skew some results (e.g. turning a fail into a
|
||||
# success or vice versa)
|
||||
# Exit with an error if there is an active ech stanza in ~/.curlrc
|
||||
# as that would likely skew some results (e.g. turning a fail into
|
||||
# a success or vice versa)
|
||||
: "${CURL_CFG_FILE=$HOME/.curlrc}"
|
||||
active_ech=$(grep ech "$CURL_CFG_FILE" | grep -v "#.*ech")
|
||||
if [[ "$active_ech" != "" ]]; then
|
||||
|
|
@ -88,7 +88,7 @@ declare -A neither_targets=(
|
|||
# Variables that can be over-ridden from environment
|
||||
#
|
||||
|
||||
# Top of curl test tree, assume we're there
|
||||
# Top of curl test tree, assume we are there
|
||||
: "${CTOP:=.}"
|
||||
|
||||
# Place to put test log output
|
||||
|
|
@ -214,7 +214,7 @@ if [ ! -d "$LTOP" ]; then
|
|||
mkdir -p "$LTOP"
|
||||
fi
|
||||
if [ ! -d "$LTOP" ]; then
|
||||
echo "Can't see $LTOP for logs - exiting"
|
||||
echo "Cannot see $LTOP for logs - exiting"
|
||||
exit 1
|
||||
fi
|
||||
logfile=$LTOP/${BINNAME}_$NOW.log
|
||||
|
|
@ -223,7 +223,7 @@ echo "-----" > "$logfile"
|
|||
echo "Running $0 at $NOW" >> "$logfile"
|
||||
echo "Running $0 at $NOW"
|
||||
|
||||
# check we have the binaries needed and which TLS library we'll be using
|
||||
# check we have the binaries needed and which TLS library we will be using
|
||||
if [ -f "$OSSL"/libssl.so ]; then
|
||||
have_ossl="yes"
|
||||
fi
|
||||
|
|
@ -254,8 +254,8 @@ wolf_cnt=$($CURL "${CURL_PARAMS[@]}" -V 2> /dev/null | grep -c wolfSSL)
|
|||
if ((wolf_cnt == 1)); then
|
||||
using_wolf="yes"
|
||||
# for some reason curl+wolfSSL dislikes certs that are ok
|
||||
# for browsers, so we'll test using "insecure" mode (-k)
|
||||
# but that's ok here as we're only interested in ECH testing
|
||||
# for browsers, so we will test using "insecure" mode (-k)
|
||||
# but that is ok here as we are only interested in ECH testing
|
||||
CURL_PARAMS+=(-k)
|
||||
fi
|
||||
# check if we have dig and it knows https or not
|
||||
|
|
@ -274,7 +274,7 @@ digout=$($digcmd https defo.ie)
|
|||
if [[ $digout != "1 . "* ]]; then
|
||||
digout=$($digcmd -t TYPE65 defo.ie)
|
||||
if [[ $digout == "1 . "* ]]; then
|
||||
# we're good
|
||||
# we are good
|
||||
have_presout="yes"
|
||||
fi
|
||||
else
|
||||
|
|
@ -282,7 +282,7 @@ else
|
|||
fi
|
||||
|
||||
# Check if ports other than 443 are blocked from this
|
||||
# vantage point (I run tests in a n/w where that's
|
||||
# vantage point (I run tests in a n/w where that is
|
||||
# sadly true sometimes;-)
|
||||
# echo "Checking if ports other than 443 are maybe blocked"
|
||||
not443testurl="https://draft-13.esni.defo.ie:9413/"
|
||||
|
|
@ -317,7 +317,7 @@ echo "dig command: |$digcmd|"
|
|||
echo "ports != 443 blocked: $have_portsblocked"
|
||||
|
||||
if [[ "$have_curl" == "no" ]]; then
|
||||
echo "Can't proceed without curl - exiting"
|
||||
echo "Cannot proceed without curl - exiting"
|
||||
exit 32
|
||||
fi
|
||||
|
||||
|
|
@ -379,7 +379,7 @@ if [[ "$using_ossl" == "yes" ]]; then
|
|||
continue
|
||||
fi
|
||||
if [[ "$host" == "cloudflare-ech.com" ]]; then
|
||||
echo "Skipping $host as they've blocked PN override"
|
||||
echo "Skipping $host as they have blocked PN override"
|
||||
continue
|
||||
fi
|
||||
path=${ech_targets[$targ]}
|
||||
|
|
@ -472,9 +472,9 @@ for targ in "${!neither_targets[@]}"; do
|
|||
echo "" >> "$logfile"
|
||||
done
|
||||
|
||||
# Check various command line options, if we're good so far
|
||||
# Check various command line options, if we are good so far
|
||||
if [[ "$using_ossl" == "yes" && "$allgood" == "yes" ]]; then
|
||||
# use this test URL as it'll tell us if things worked
|
||||
# use this test URL as it will tell us if things worked
|
||||
turl="https://defo.ie/ech-check.php"
|
||||
echo "cli_test with $turl"
|
||||
echo "cli_test with $turl" >> "$logfile"
|
||||
|
|
@ -490,8 +490,8 @@ fi
|
|||
|
||||
fi # skip
|
||||
|
||||
# Check combinations of command line options, if we're good so far
|
||||
# Most of this only works for OpenSSL, which is ok, as we're checking
|
||||
# Check combinations of command line options, if we are good so far
|
||||
# Most of this only works for OpenSSL, which is ok, as we are checking
|
||||
# the argument handling here, not the ECH protocol
|
||||
if [[ "$using_ossl" == "yes" && "$allgood" == "yes" ]]; then
|
||||
# ech can be hard, true, grease or false
|
||||
|
|
@ -786,11 +786,11 @@ if [[ "$using_ossl" == "yes" && "$allgood" == "yes" ]]; then
|
|||
cli_test "$turl" 1 1 --ech true --ech pn:"$goodpn"
|
||||
[ "$allgood" != "yes" ] && echo "$LINENO"
|
||||
|
||||
# a target URL that doesn't support ECH
|
||||
# a target URL that does not support ECH
|
||||
turl="https://tcd.ie"
|
||||
echo "cli_test with $turl"
|
||||
echo "cli_test with $turl" >> "$logfile"
|
||||
# the params below don't matter much here as we'll fail anyway
|
||||
# the params below do not matter much here as we will fail anyway
|
||||
echconfiglist=$(get_ech_configlist defo.ie)
|
||||
goodecl=$echconfiglist
|
||||
badecl="$goodecl"
|
||||
|
|
@ -1083,13 +1083,13 @@ else
|
|||
echo "NOT all good, log in $logfile"
|
||||
fi
|
||||
|
||||
# send a mail to root (will be fwd'd) but just once every 24 hours
|
||||
# send a mail to root (will be forwarded) but just once every 24 hours
|
||||
# 'cause we only really need "new" news
|
||||
itsnews="yes"
|
||||
age_of_news=0
|
||||
if [ -f "$LTOP"/bad_runs ]; then
|
||||
age_of_news=$(fileage "$LTOP"/bad_runs)
|
||||
# only consider news "new" if we haven't mailed today
|
||||
# only consider news "new" if we have not mailed today
|
||||
if ((age_of_news < 24*3600)); then
|
||||
itsnews="no"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
# protocols simultaneously.
|
||||
#
|
||||
# It is meant to exercise curl, it is not meant to be a fully working
|
||||
# or even very standard compliant server.
|
||||
# or even overly standard compliant server.
|
||||
#
|
||||
# You may optionally specify port on the command line, otherwise it'll
|
||||
# default to port 8921.
|
||||
|
|
@ -147,15 +147,15 @@ my %displaytext; # text returned to client before callback runs
|
|||
#
|
||||
my $ctrldelay; # set if server should throttle ctrl stream
|
||||
my $datadelay; # set if server should throttle data stream
|
||||
my $retrweirdo; # set if ftp server should use RETRWEIRDO
|
||||
my $retrnosize; # set if ftp server should use RETRNOSIZE
|
||||
my $retrsize; # set if ftp server should use RETRSIZE
|
||||
my $pasvbadip; # set if ftp server should use PASVBADIP
|
||||
my $nosave; # set if ftp server should not save uploaded data
|
||||
my $nodataconn; # set if ftp srvr doesn't establish or accepts data channel
|
||||
my $nodataconn425; # set if ftp srvr doesn't establish data ch and replies 425
|
||||
my $nodataconn421; # set if ftp srvr doesn't establish data ch and replies 421
|
||||
my $nodataconn150; # set if ftp srvr doesn't establish data ch and replies 150
|
||||
my $retrweirdo; # set if FTP server should use RETRWEIRDO
|
||||
my $retrnosize; # set if FTP server should use RETRNOSIZE
|
||||
my $retrsize; # set if FTP server should use RETRSIZE
|
||||
my $pasvbadip; # set if FTP server should use PASVBADIP
|
||||
my $nosave; # set if FTP server should not save uploaded data
|
||||
my $nodataconn; # set if FTP srvr does not establish or accepts data channel
|
||||
my $nodataconn425; # set if FTP srvr does not establish data ch and replies 425
|
||||
my $nodataconn421; # set if FTP srvr does not establish data ch and replies 421
|
||||
my $nodataconn150; # set if FTP srvr does not establish data ch and replies 150
|
||||
my $storeresp;
|
||||
my $postfetch;
|
||||
my @capabilities; # set if server supports capability commands
|
||||
|
|
@ -166,7 +166,7 @@ my %customcount; #
|
|||
my %delayreply; #
|
||||
|
||||
#**********************************************************************
|
||||
# global variables for to test ftp wildcardmatching or other test that
|
||||
# global variables for to test FTP wildcardmatching or other test that
|
||||
# need flexible LIST responses.. and corresponding files.
|
||||
# $ftptargetdir is keeping the fake "name" of LIST directory.
|
||||
#
|
||||
|
|
@ -174,7 +174,7 @@ my $ftplistparserstate;
|
|||
my $ftptargetdir="";
|
||||
|
||||
#**********************************************************************
|
||||
# global variables used when running a ftp server to keep state info
|
||||
# global variables used when running an FTP server to keep state info
|
||||
# relative to the secondary or data sockfilt process. Values of these
|
||||
# variables should only be modified using datasockf_state() sub, given
|
||||
# that they are closely related and relationship is a bit awkward.
|
||||
|
|
@ -768,7 +768,7 @@ sub EHLO_smtp {
|
|||
my @data;
|
||||
|
||||
# TODO: Get the IP address of the client connection to use in the
|
||||
# EHLO response when the client doesn't specify one but for now use
|
||||
# EHLO response when the client does not specify one but for now use
|
||||
# 127.0.0.1
|
||||
if(!$client) {
|
||||
$client = "[127.0.0.1]";
|
||||
|
|
@ -823,7 +823,7 @@ sub HELO_smtp {
|
|||
my ($client) = @_;
|
||||
|
||||
# TODO: Get the IP address of the client connection to use in the HELO
|
||||
# response when the client doesn't specify one but for now use 127.0.0.1
|
||||
# response when the client does not specify one but for now use 127.0.0.1
|
||||
if(!$client) {
|
||||
$client = "[127.0.0.1]";
|
||||
}
|
||||
|
|
@ -864,7 +864,7 @@ sub MAIL_smtp {
|
|||
}
|
||||
}
|
||||
|
||||
# this server doesn't "validate" MAIL FROM addresses
|
||||
# this server does not "validate" MAIL FROM addresses
|
||||
if(length($from)) {
|
||||
my @found;
|
||||
my $valid = 1;
|
||||
|
|
@ -2765,7 +2765,7 @@ sub datasockf_state {
|
|||
}
|
||||
elsif($state eq 'PASSIVE_NODATACONN') {
|
||||
# Data sockfilter bound port without listening,
|
||||
# client won't be able to establish data connection.
|
||||
# client will not be able to establish data connection.
|
||||
$datasockf_state = $state;
|
||||
$datasockf_mode = 'passive';
|
||||
$datasockf_runs = 'yes';
|
||||
|
|
@ -2930,7 +2930,7 @@ sub customize {
|
|||
@auth_mechs = split(/ /, $1);
|
||||
}
|
||||
elsif($_ =~ /NOSAVE/) {
|
||||
# don't actually store the file we upload - to be used when
|
||||
# do not actually store the file we upload - to be used when
|
||||
# uploading insanely huge amounts
|
||||
$nosave = 1;
|
||||
logmsg "FTPD: NOSAVE prevents saving of uploaded data\n";
|
||||
|
|
@ -3332,7 +3332,7 @@ while(1) {
|
|||
$check = 0;
|
||||
}
|
||||
|
||||
# only perform this if we're not faking a reply
|
||||
# only perform this if we are not faking a reply
|
||||
my $func = $commandfunc{uc($FTPCMD)};
|
||||
if($func) {
|
||||
&$func($FTPARG, $FTPCMD);
|
||||
|
|
|
|||
|
|
@ -845,7 +845,7 @@ def print_file(filename):
|
|||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(prog='scorecard', description="""
|
||||
Run a range of tests to give a scorecard for a HTTP protocol
|
||||
Run a range of tests to give a scorecard for an HTTP protocol
|
||||
'h3' or 'h2' implementation in curl.
|
||||
""")
|
||||
parser.add_argument("-v", "--verbose", action='count', default=1,
|
||||
|
|
|
|||
|
|
@ -716,7 +716,7 @@ class TestDownload:
|
|||
if proto == 'h3' and env.curl_uses_lib('quiche'):
|
||||
pytest.skip("quiche fails from 16k onwards")
|
||||
curl = CurlClient(env=env)
|
||||
# url is longer than 'url_len'
|
||||
# 'url' is longer than 'url_len'
|
||||
url = f'https://{env.authority_for(env.domain1, proto)}/data.json?{"x"*(url_junk)}'
|
||||
r = curl.http_download(urls=[url], alpn_proto=proto)
|
||||
if url_junk <= 1024:
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ class TestProxy:
|
|||
@pytest.mark.skipif(condition=not Env.curl_is_debug(), reason="needs curl debug")
|
||||
@pytest.mark.skipif(condition=not Env.curl_is_verbose(), reason="needs curl verbose strings")
|
||||
def test_10_10_reuse_proxy(self, env: Env, httpd, nghttpx_fwd, tunnel):
|
||||
# url twice via https: proxy separated with '--next', will reuse
|
||||
# URL twice via https: proxy separated with '--next', will reuse
|
||||
if tunnel == 'h2' and not env.curl_uses_lib('nghttp2'):
|
||||
pytest.skip('only supported with nghttp2')
|
||||
if env.curl_uses_lib('mbedtls') and \
|
||||
|
|
|
|||
|
|
@ -165,10 +165,10 @@ class Caddy:
|
|||
def _write_config(self):
|
||||
domain1 = self.env.domain1
|
||||
creds1 = self.env.get_credentials(domain1)
|
||||
assert creds1 # convince pytype this isn't None
|
||||
assert creds1 # convince pytype this is not None
|
||||
domain2 = self.env.domain2
|
||||
creds2 = self.env.get_credentials(domain2)
|
||||
assert creds2 # convince pytype this isn't None
|
||||
assert creds2 # convince pytype this is not None
|
||||
self._mkpath(self._docs_dir)
|
||||
self._mkpath(self._tmp_dir)
|
||||
with open(os.path.join(self._docs_dir, 'data.json'), 'w') as fd:
|
||||
|
|
|
|||
|
|
@ -100,9 +100,9 @@ class Httpd:
|
|||
raise Exception(f'{env.apxs} failed to query libexecdir: {p}')
|
||||
self._mods_dir = p.stdout.strip()
|
||||
if self._mods_dir is None:
|
||||
raise Exception('apache modules dir cannot be found')
|
||||
raise Exception('apache modules directory cannot be found')
|
||||
if not os.path.exists(self._mods_dir):
|
||||
raise Exception(f'apache modules dir does not exist: {self._mods_dir}')
|
||||
raise Exception(f'apache modules directory does not exist: {self._mods_dir}')
|
||||
self._maybe_running = False
|
||||
self.ports = {}
|
||||
self._rmf(self._error_log)
|
||||
|
|
@ -260,17 +260,17 @@ class Httpd:
|
|||
domain1 = self.env.domain1
|
||||
domain1brotli = self.env.domain1brotli
|
||||
creds1 = self.env.get_credentials(self._domain1_cred_name)
|
||||
assert creds1 # convince pytype this isn't None
|
||||
assert creds1 # convince pytype this is not None
|
||||
self._loaded_domain1_cred_name = self._domain1_cred_name
|
||||
domain2 = self.env.domain2
|
||||
creds2 = self.env.get_credentials(domain2)
|
||||
assert creds2 # convince pytype this isn't None
|
||||
assert creds2 # convince pytype this is not None
|
||||
exp_domain = self.env.expired_domain
|
||||
exp_creds = self.env.get_credentials(exp_domain)
|
||||
assert exp_creds # convince pytype this isn't None
|
||||
assert exp_creds # convince pytype this is not None
|
||||
proxy_domain = self.env.proxy_domain
|
||||
proxy_creds = self.env.get_credentials(proxy_domain)
|
||||
assert proxy_creds # convince pytype this isn't None
|
||||
assert proxy_creds # convince pytype this is not None
|
||||
self._mkpath(self._conf_dir)
|
||||
self._mkpath(self._docs_dir)
|
||||
self._mkpath(self._logs_dir)
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue