mirror of
https://github.com/curl/curl.git
synced 2026-08-24 22:43:38 +03:00
tidy-up: miscellaneous
- fix typos and wording in documentation and comments. - KNOWN_BUGS: merge duplicate H1 section. - test_10_proxy: delete stray expressions. - Perl: `while()` -> `while(1)`. - Perl: fix indent, whitespace, drop redundant quotes and parentheses. - fix casing: URL, SSL, Windows. - badwords: readd `threadsafe`, add `well-known` (and fix it). - replace `WinXP` -> `Windows XP` to match other uses. Closes #21646
This commit is contained in:
parent
1c3289c85e
commit
b3f76b21c9
44 changed files with 106 additions and 102 deletions
|
|
@ -32,9 +32,9 @@ BEGIN {
|
|||
use base qw(Exporter);
|
||||
|
||||
our @EXPORT = qw(
|
||||
appveyor_check_environment
|
||||
appveyor_create_test_result
|
||||
appveyor_update_test_result
|
||||
appveyor_check_environment
|
||||
appveyor_create_test_result
|
||||
appveyor_update_test_result
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -48,12 +48,12 @@ sub appveyor_check_environment {
|
|||
}
|
||||
|
||||
sub appveyor_create_test_result {
|
||||
my ($curl, $testnum, $testname)=@_;
|
||||
my ($curl, $testnum, $testname) = @_;
|
||||
$testname =~ s/\\/\\\\/g;
|
||||
$testname =~ s/\"/\\\"/g;
|
||||
$testname =~ s/\'/'"'"'/g;
|
||||
my $appveyor_baseurl="$ENV{'APPVEYOR_API_URL'}";
|
||||
my $appveyor_result=`$curl --silent --noproxy '*' \\
|
||||
my $appveyor_baseurl = $ENV{'APPVEYOR_API_URL'};
|
||||
my $appveyor_result = `$curl --silent --noproxy '*' \\
|
||||
--header 'Content-Type: application/json' \\
|
||||
--data '
|
||||
{
|
||||
|
|
@ -69,8 +69,8 @@ sub appveyor_create_test_result {
|
|||
}
|
||||
|
||||
sub appveyor_update_test_result {
|
||||
my ($curl, $testnum, $error, $start, $stop)=@_;
|
||||
my $testname=$APPVEYOR_TEST_NAMES{$testnum};
|
||||
my ($curl, $testnum, $error, $start, $stop) = @_;
|
||||
my $testname = $APPVEYOR_TEST_NAMES{$testnum};
|
||||
if(!defined $testname) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -96,8 +96,8 @@ sub appveyor_update_test_result {
|
|||
$appveyor_outcome = 'Failed';
|
||||
$appveyor_category = 'Error';
|
||||
}
|
||||
my $appveyor_baseurl="$ENV{'APPVEYOR_API_URL'}";
|
||||
my $appveyor_result=`$curl --silent --noproxy '*' --request PUT \\
|
||||
my $appveyor_baseurl = $ENV{'APPVEYOR_API_URL'};
|
||||
my $appveyor_result = `$curl --silent --noproxy '*' --request PUT \\
|
||||
--header 'Content-Type: application/json' \\
|
||||
--data '
|
||||
{
|
||||
|
|
@ -112,7 +112,7 @@ sub appveyor_update_test_result {
|
|||
'$appveyor_baseurl/api/tests'`;
|
||||
print "AppVeyor API result: $appveyor_result\n" if($appveyor_result);
|
||||
if($appveyor_category eq 'Error') {
|
||||
$appveyor_result=`$curl --silent --noproxy '*' \\
|
||||
$appveyor_result = `$curl --silent --noproxy '*' \\
|
||||
--header 'Content-Type: application/json' \\
|
||||
--data '
|
||||
{
|
||||
|
|
|
|||
|
|
@ -53,9 +53,9 @@ sub azure_check_environment {
|
|||
}
|
||||
|
||||
sub azure_create_test_run {
|
||||
my ($curl)=@_;
|
||||
my $azure_baseurl="$ENV{'SYSTEM_TEAMFOUNDATIONCOLLECTIONURI'}$ENV{'SYSTEM_TEAMPROJECTID'}";
|
||||
my $azure_run=`$curl --silent --noproxy "*" \\
|
||||
my ($curl) = @_;
|
||||
my $azure_baseurl = "$ENV{'SYSTEM_TEAMFOUNDATIONCOLLECTIONURI'}$ENV{'SYSTEM_TEAMPROJECTID'}";
|
||||
my $azure_run = `$curl --silent --noproxy "*" \\
|
||||
--header "Authorization: Bearer $ENV{'AZURE_ACCESS_TOKEN'}" \\
|
||||
--header "Content-Type: application/json" \\
|
||||
--data "
|
||||
|
|
@ -73,13 +73,13 @@ sub azure_create_test_run {
|
|||
}
|
||||
|
||||
sub azure_create_test_result {
|
||||
my ($curl, $azure_run_id, $testnum, $testname)=@_;
|
||||
my ($curl, $azure_run_id, $testnum, $testname) = @_;
|
||||
$testname =~ s/\\/\\\\/g;
|
||||
$testname =~ s/\"/\\\"/g;
|
||||
$testname =~ s/\'/'"'"'/g;
|
||||
my $title_testnum=sprintf("%04d", $testnum);
|
||||
my $azure_baseurl="$ENV{'SYSTEM_TEAMFOUNDATIONCOLLECTIONURI'}$ENV{'SYSTEM_TEAMPROJECTID'}";
|
||||
my $azure_result=`$curl --silent --noproxy '*' \\
|
||||
my $title_testnum = sprintf("%04d", $testnum);
|
||||
my $azure_baseurl = "$ENV{'SYSTEM_TEAMFOUNDATIONCOLLECTIONURI'}$ENV{'SYSTEM_TEAMPROJECTID'}";
|
||||
my $azure_result = `$curl --silent --noproxy '*' \\
|
||||
--header "Authorization: Bearer $ENV{'AZURE_ACCESS_TOKEN'}" \\
|
||||
--header 'Content-Type: application/json' \\
|
||||
--data '
|
||||
|
|
@ -102,7 +102,7 @@ sub azure_create_test_result {
|
|||
}
|
||||
|
||||
sub azure_update_test_result {
|
||||
my ($curl, $azure_run_id, $azure_result_id, $testnum, $error, $start, $stop)=@_;
|
||||
my ($curl, $azure_run_id, $azure_result_id, $testnum, $error, $start, $stop) = @_;
|
||||
if(!defined $stop) {
|
||||
$stop = $start;
|
||||
}
|
||||
|
|
@ -122,8 +122,8 @@ sub azure_update_test_result {
|
|||
else {
|
||||
$azure_outcome = 'Failed';
|
||||
}
|
||||
my $azure_baseurl="$ENV{'SYSTEM_TEAMFOUNDATIONCOLLECTIONURI'}$ENV{'SYSTEM_TEAMPROJECTID'}";
|
||||
my $azure_result=`$curl --silent --noproxy '*' --request PATCH \\
|
||||
my $azure_baseurl = "$ENV{'SYSTEM_TEAMFOUNDATIONCOLLECTIONURI'}$ENV{'SYSTEM_TEAMPROJECTID'}";
|
||||
my $azure_result = `$curl --silent --noproxy '*' --request PATCH \\
|
||||
--header "Authorization: Bearer $ENV{'AZURE_ACCESS_TOKEN'}" \\
|
||||
--header "Content-Type: application/json" \\
|
||||
--data '
|
||||
|
|
@ -145,9 +145,9 @@ sub azure_update_test_result {
|
|||
}
|
||||
|
||||
sub azure_update_test_run {
|
||||
my ($curl, $azure_run_id)=@_;
|
||||
my $azure_baseurl="$ENV{'SYSTEM_TEAMFOUNDATIONCOLLECTIONURI'}$ENV{'SYSTEM_TEAMPROJECTID'}";
|
||||
my $azure_run=`$curl --silent --noproxy '*' --request PATCH \\
|
||||
my ($curl, $azure_run_id) = @_;
|
||||
my $azure_baseurl = "$ENV{'SYSTEM_TEAMFOUNDATIONCOLLECTIONURI'}$ENV{'SYSTEM_TEAMPROJECTID'}";
|
||||
my $azure_run = `$curl --silent --noproxy '*' --request PATCH \\
|
||||
--header "Authorization: Bearer $ENV{'AZURE_ACCESS_TOKEN'}" \\
|
||||
--header 'Content-Type: application/json' \\
|
||||
--data '
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ OpenSSL
|
|||
https
|
||||
</server>
|
||||
<name>
|
||||
concurrent HTTPS GET using shared ssl session cache
|
||||
concurrent HTTPS GET using shared SSL session cache
|
||||
</name>
|
||||
<tool>
|
||||
lib%TESTNUMBER
|
||||
|
|
|
|||
|
|
@ -397,7 +397,7 @@ class TestProxy:
|
|||
xargs.append('-6')
|
||||
r = curl.http_download(urls=[url], alpn_proto='http/1.1', with_stats=True,
|
||||
extra_args=xargs)
|
||||
r.check_exit_code(0), f'{r}'
|
||||
r.check_exit_code(0)
|
||||
r.check_response(count=1, http_status=200, protocol='HTTP/1.1')
|
||||
|
||||
# download via http: ipv6 proxy (no tunnel) using IP address, IPv4 only
|
||||
|
|
@ -411,7 +411,7 @@ class TestProxy:
|
|||
xargs.append('-4')
|
||||
r = curl.http_download(urls=[url], alpn_proto='http/1.1', with_stats=True,
|
||||
extra_args=xargs)
|
||||
r.check_exit_code(0), f'{r}'
|
||||
r.check_exit_code(0)
|
||||
r.check_response(count=1, http_status=200, protocol='HTTP/1.1')
|
||||
|
||||
# download via http: proxy (no tunnel), check connection reuse
|
||||
|
|
|
|||
|
|
@ -587,7 +587,7 @@ cleanup:
|
|||
}
|
||||
if(t->result)
|
||||
result = t->result;
|
||||
else /* on success we expect ssl to have been checked */
|
||||
else /* on success we expect SSL to have been checked */
|
||||
assert(t->checked_ssl);
|
||||
}
|
||||
curlx_free(transfer_d);
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ void ws_close(CURL *curl); /* just close the connection */
|
|||
#endif
|
||||
|
||||
/*
|
||||
* TEST_ERR_* values must within the CURLcode range to not cause compiler
|
||||
* TEST_ERR_* values must be within the CURLcode range to not cause compiler
|
||||
* errors.
|
||||
*
|
||||
* For portability reasons TEST_ERR_* values should be less than 127.
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ static unsigned int test_thread(void *ptr)
|
|||
int i;
|
||||
|
||||
/* Loop the transfer and cleanup the handle properly every lap. This will
|
||||
still reuse ssl session since the pool is in the shared object! */
|
||||
still reuse SSL session since the pool is in the shared object! */
|
||||
for(i = 0; i < PER_THREAD_SIZE; i++) {
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
# (in controlleripccall) which is later read from and the arguments
|
||||
# unmarshalled (in ipcrecv) before the desired function is called normally.
|
||||
# The function return values are then marshalled and written into another pipe
|
||||
# (again in ipcrecv) when is later read from and unmarshalled (in runnerar)
|
||||
# (again in ipcrecv) which is later read from and unmarshalled (in runnerar)
|
||||
# before being returned to the caller.
|
||||
|
||||
package runner;
|
||||
|
|
@ -251,7 +251,7 @@ sub runner_init {
|
|||
#######################################################################
|
||||
# Loop to execute incoming IPC calls until the shutdown call
|
||||
sub event_loop {
|
||||
while() {
|
||||
while(1) {
|
||||
if(ipcrecv()) {
|
||||
last;
|
||||
}
|
||||
|
|
@ -666,7 +666,7 @@ sub singletest_setenv {
|
|||
if($s =~ /([^=]*)(.*)/) {
|
||||
my ($var, $content) = ($1, $2);
|
||||
# remember current setting, to restore it once test runs
|
||||
$oldenv{$var} = ($ENV{$var}) ? "$ENV{$var}" : 'notset';
|
||||
$oldenv{$var} = $ENV{$var} ? $ENV{$var} : 'notset';
|
||||
|
||||
if($content =~ /^=(.*)/) {
|
||||
# assign it
|
||||
|
|
|
|||
|
|
@ -664,9 +664,9 @@ sub checksystemfeatures {
|
|||
$feature{"TrackMemory"} = $feat =~ /\bDebug/;
|
||||
# curl was built with --enable-debug
|
||||
$feature{"Debug"} = $feat =~ /\bDebug/;
|
||||
# ssl enabled
|
||||
# SSL enabled
|
||||
$feature{"SSL"} = $feat =~ /SSL/i;
|
||||
# multiple ssl backends available.
|
||||
# multiple SSL backends available.
|
||||
$feature{"MultiSSL"} = $feat =~ /MultiSSL/i;
|
||||
# large file support
|
||||
$feature{"Largefile"} = $feat =~ /Largefile/i;
|
||||
|
|
@ -3054,7 +3054,7 @@ else {
|
|||
$retry_left = $retry;
|
||||
}
|
||||
|
||||
while() {
|
||||
while(1) {
|
||||
# check the abort flag
|
||||
if($globalabort) {
|
||||
logmsg singletest_dumplogs();
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ my %PORT = (nolisten => 47); # port we use for a local non-listening service
|
|||
my $server_response_maxtime=13;
|
||||
my $httptlssrv = find_httptlssrv();
|
||||
my %run; # running server
|
||||
my %runcert; # cert file currently in use by an ssl running server
|
||||
my %runcert; # cert file currently in use by an SSL running server
|
||||
my $CLIENTIP="127.0.0.1"; # address which curl uses for incoming connections
|
||||
my $CLIENT6IP="[::1]"; # address which curl uses for incoming connections
|
||||
my $posix_pwd = build_sys_abs_path($pwd); # current working directory in POSIX format
|
||||
|
|
@ -435,11 +435,11 @@ sub stopserver {
|
|||
#
|
||||
my @killservers;
|
||||
if($server =~ /^(ftp|http|imap|pop3|smtp)s((\d*)(-ipv6|-unix|))$/) {
|
||||
# given a stunnel based ssl server, also kill non-ssl underlying one
|
||||
# given a stunnel based SSL server, also kill non-SSL underlying one
|
||||
push @killservers, "${1}${2}";
|
||||
}
|
||||
elsif($server =~ /^(ftp|http|imap|pop3|smtp)((\d*)(-ipv6|-unix|))$/) {
|
||||
# given a non-ssl server, also kill stunnel based ssl piggybacking one
|
||||
# given a non-SSL server, also kill stunnel based SSL piggybacking one
|
||||
push @killservers, "${1}s${2}";
|
||||
}
|
||||
elsif($server =~ /^(socks)((\d*)(-ipv6|))$/) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue