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
2011-02-05 16:37:37 +0000
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
32c6531d92ee7eb1fcfede36228f16abc5d39373
32c6531d
2 parents
fd63cc25
85199a51
Merge branch 'master' of
https://github.com/adib/asi-http-request
into adib-master
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
Classes/ASIHTTPRequest.m
Classes/ASIHTTPRequest.m
View file @
32c6531
...
...
@@ -2403,6 +2403,30 @@ static NSOperationQueue *sharedQueue = nil;
// If we have a username and password, let's apply them to the request and continue
if
(
user
&&
pass
)
{
// --- BEGIN adib 7-Jan-2011
// set domain for NTLM
{
NSString
*
authScheme
=
[
self
proxyAuthenticationScheme
];
if
([
authScheme
isEqualToString
:(
NSString
*
)
kCFHTTPAuthenticationSchemeNTLM
])
{
NSString
*
ntlmDomain
=
[
self
proxyDomain
];
if
(
!
ntlmDomain
||
[
ntlmDomain
length
]
==
0
)
{
// try to extract the domain from the user name if its in the form DOMAIN\username
NSArray
*
ntlmComponents
=
[
user
componentsSeparatedByString
:
@"
\\
"
];
if
(
ntlmComponents
.
count
==
2
)
{
NSString
*
domainName
=
[
ntlmComponents
objectAtIndex
:
0
];
NSString
*
userName
=
[
ntlmComponents
objectAtIndex
:
1
];
user
=
userName
;
ntlmDomain
=
domainName
;
}
}
if
(
ntlmDomain
)
{
[
newCredentials
setObject
:
ntlmDomain
forKey
:
(
NSString
*
)
kCFHTTPAuthenticationAccountDomain
];
}
}
}
// --- END adib 7-Jan-2011
[
newCredentials
setObject
:
user
forKey
:(
NSString
*
)
kCFHTTPAuthenticationUsername
];
[
newCredentials
setObject
:
pass
forKey
:(
NSString
*
)
kCFHTTPAuthenticationPassword
];
...
...
Please
register
or
login
to post a comment