Toggle navigation
Toggle navigation
This project
Loading...
Sign in
iOS
/
asi-http-request
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Ben Copsey
2009-10-04 13:15:06 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8bdb6cf139c3f502d950e57ddcea26c96b365c62
8bdb6cf1
1 parent
3b5e9425
Fix session credentials matching
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
Classes/ASIHTTPRequest.m
Classes/ASIHTTPRequest.m
View file @
8bdb6cf
...
...
@@ -2153,7 +2153,7 @@ static NSRecursiveLock *delegateAuthenticationLock = nil;
[
sessionCredentialsLock
lock
];
NSMutableArray
*
sessionCredentialsList
=
[[
self
class
]
sessionProxyCredentialsStore
];
for
(
NSDictionary
*
theCredentials
in
sessionCredentialsList
)
{
if
([[
theCredentials
objectForKey
:
@"Host"
]
isEqualTo
:[
self
proxyHost
]]
&&
[[
theCredentials
objectForKey
:
@"Port"
]
intValue
]
==
[
self
proxyPort
])
{
if
([[
theCredentials
objectForKey
:
@"Host"
]
isEqualTo
String
:[
self
proxyHost
]]
&&
[[
theCredentials
objectForKey
:
@"Port"
]
intValue
]
==
[
self
proxyPort
])
{
[
sessionCredentialsLock
unlock
];
return
theCredentials
;
}
...
...
@@ -2169,8 +2169,8 @@ static NSRecursiveLock *delegateAuthenticationLock = nil;
NSMutableArray
*
sessionCredentialsList
=
[[
self
class
]
sessionCredentialsStore
];
// Find an exact match
for
(
NSDictionary
*
theCredentials
in
sessionCredentialsList
)
{
if
([[
theCredentials
objectForKey
:
@"URL"
]
isEqual
To
:[
self
url
]])
{
if
(
!
[
self
responseStatusCode
]
||
[[
theCredentials
objectForKey
:
@"AuthenticationRealm"
]
isEqualTo
:[
self
authenticationRealm
]])
{
if
([[
theCredentials
objectForKey
:
@"URL"
]
isEqual
:[
self
url
]])
{
if
(
!
[
self
responseStatusCode
]
||
[[
theCredentials
objectForKey
:
@"AuthenticationRealm"
]
isEqualTo
String
:[
self
authenticationRealm
]])
{
[
sessionCredentialsLock
unlock
];
return
theCredentials
;
}
...
...
@@ -2180,8 +2180,8 @@ static NSRecursiveLock *delegateAuthenticationLock = nil;
NSURL
*
requestURL
=
[
self
url
];
for
(
NSDictionary
*
theCredentials
in
sessionCredentialsList
)
{
NSURL
*
theURL
=
[
theCredentials
objectForKey
:
@"URL"
];
if
([[
theURL
host
]
isEqualTo
:[
requestURL
host
]]
&&
[[
theURL
port
]
isEqualTo
:[
requestURL
port
]]
&&
[[
theURL
scheme
]
isEqualTo
:[
requestURL
scheme
]])
{
if
(
!
[
self
responseStatusCode
]
||
[[
theCredentials
objectForKey
:
@"AuthenticationRealm"
]
isEqualTo
:[
self
authenticationRealm
]])
{
if
([[
theURL
host
]
isEqualTo
String
:[
requestURL
host
]]
&&
[[
theURL
port
]
isEqualToNumber
:[
requestURL
port
]]
&&
[[
theURL
scheme
]
isEqualToString
:[
requestURL
scheme
]])
{
if
(
!
[
self
responseStatusCode
]
||
[[
theCredentials
objectForKey
:
@"AuthenticationRealm"
]
isEqualTo
String
:[
self
authenticationRealm
]])
{
[
sessionCredentialsLock
unlock
];
return
theCredentials
;
}
...
...
Please
register
or
login
to post a comment