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
cd7a0f82
Commit
cd7a0f82
authored
20 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
When doing auth negotiations or authprobing, we only consider HTTP code
<300 to be good.
parent
cf3f1ef2
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
lib/http.c
+7
-4
7 additions, 4 deletions
lib/http.c
with
7 additions
and
4 deletions
lib/http.c
+
7
−
4
View file @
cd7a0f82
...
...
@@ -209,13 +209,15 @@ CURLcode Curl_http_auth_act(struct connectdata *conn)
return
data
->
set
.
http_fail_on_error
?
CURLE_HTTP_RETURNED_ERROR
:
CURLE_OK
;
if
(
conn
->
bits
.
user_passwd
&&
((
conn
->
keep
.
httpcode
==
401
)
||
conn
->
bits
.
authprobe
))
{
((
conn
->
keep
.
httpcode
==
401
)
||
(
conn
->
bits
.
authprobe
&&
conn
->
keep
.
httpcode
<
300
)))
{
pickhost
=
pickoneauth
(
&
data
->
state
.
authhost
);
if
(
!
pickhost
)
data
->
state
.
authproblem
=
TRUE
;
}
if
(
conn
->
bits
.
proxy_user_passwd
&&
((
conn
->
keep
.
httpcode
==
407
)
||
conn
->
bits
.
authprobe
)
)
{
((
conn
->
keep
.
httpcode
==
407
)
||
(
conn
->
bits
.
authprobe
&&
conn
->
keep
.
httpcode
<
300
)))
{
pickproxy
=
pickoneauth
(
&
data
->
state
.
authproxy
);
if
(
!
pickproxy
)
data
->
state
.
authproblem
=
TRUE
;
...
...
@@ -224,8 +226,9 @@ CURLcode Curl_http_auth_act(struct connectdata *conn)
if
(
pickhost
||
pickproxy
)
conn
->
newurl
=
strdup
(
data
->
change
.
url
);
/* clone URL */
else
if
((
data
->
info
.
httpcode
<
400
)
&&
(
!
data
->
state
.
authhost
.
done
))
{
else
if
((
conn
->
keep
.
httpcode
<
300
)
&&
(
!
data
->
state
.
authhost
.
done
)
&&
conn
->
bits
.
authprobe
)
{
/* no (known) authentication available,
authentication is not "done" yet and
no authentication seems to be required and
...
...
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