Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
f99430d8
Commit
f99430d8
authored
12 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
libauthretry.c: shorten lines to fit within 80 cols
parent
09a49137
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/libtest/libauthretry.c
+10
-6
10 additions, 6 deletions
tests/libtest/libauthretry.c
with
10 additions
and
6 deletions
tests/libtest/libauthretry.c
+
10
−
6
View file @
f99430d8
...
...
@@ -28,7 +28,8 @@
#include
"memdebug.h"
static
int
send_request
(
CURL
*
curl
,
const
char
*
url
,
int
seq
,
long
auth_scheme
,
const
char
*
userpwd
)
static
int
send_request
(
CURL
*
curl
,
const
char
*
url
,
int
seq
,
long
auth_scheme
,
const
char
*
userpwd
)
{
CURLcode
res
;
char
*
full_url
=
malloc
(
strlen
(
url
)
+
4
+
1
);
...
...
@@ -39,7 +40,8 @@ static int send_request(CURL *curl, const char *url, int seq, long auth_scheme,
}
sprintf
(
full_url
,
"%s%04d"
,
url
,
seq
);
fprintf
(
stderr
,
"Sending new request %d to %s with credential %s (auth %ld)
\n
"
,
seq
,
full_url
,
userpwd
,
auth_scheme
);
fprintf
(
stderr
,
"Sending new request %d to %s with credential %s "
"(auth %ld)
\n
"
,
seq
,
full_url
,
userpwd
,
auth_scheme
);
test_setopt
(
curl
,
CURLOPT_URL
,
full_url
);
test_setopt
(
curl
,
CURLOPT_VERBOSE
,
1L
);
test_setopt
(
curl
,
CURLOPT_HEADER
,
1L
);
...
...
@@ -50,16 +52,18 @@ static int send_request(CURL *curl, const char *url, int seq, long auth_scheme,
res
=
curl_easy_perform
(
curl
);
test_cleanup:
free
(
full_url
);
free
(
full_url
);
return
res
;
}
static
int
send_wrong_password
(
CURL
*
curl
,
const
char
*
url
,
int
seq
,
long
auth_scheme
)
static
int
send_wrong_password
(
CURL
*
curl
,
const
char
*
url
,
int
seq
,
long
auth_scheme
)
{
return
send_request
(
curl
,
url
,
seq
,
auth_scheme
,
"testuser:wrongpass"
);
}
static
int
send_right_password
(
CURL
*
curl
,
const
char
*
url
,
int
seq
,
long
auth_scheme
)
static
int
send_right_password
(
CURL
*
curl
,
const
char
*
url
,
int
seq
,
long
auth_scheme
)
{
return
send_request
(
curl
,
url
,
seq
,
auth_scheme
,
"testuser:testpass"
);
}
...
...
@@ -87,7 +91,7 @@ int test(char *url)
long
fallback_auth_scheme
=
parse_auth_name
(
libtest_arg3
);
if
(
main_auth_scheme
==
CURLAUTH_NONE
||
fallback_auth_scheme
==
CURLAUTH_NONE
)
{
fallback_auth_scheme
==
CURLAUTH_NONE
)
{
fprintf
(
stderr
,
"auth schemes not found on commandline
\n
"
);
res
=
TEST_ERR_MAJOR_BAD
;
goto
test_cleanup
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment