mirror of
https://github.com/moparisthebest/davmail
synced 2025-02-28 17:31:52 -05:00
Fix 3001579: improve NTLM support
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1056 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
5a833a6794
commit
0f885b13df
@ -438,7 +438,7 @@ public final class DavGatewayHttpClientFacade {
|
||||
public static boolean acceptsNTLMOnly(HttpMethod getMethod) {
|
||||
Header authenticateHeader = null;
|
||||
if (getMethod.getStatusCode() == HttpStatus.SC_UNAUTHORIZED) {
|
||||
authenticateHeader = getMethod.getResponseHeader("Authenticate");
|
||||
authenticateHeader = getMethod.getResponseHeader("WWW-Authenticate");
|
||||
} else if (getMethod.getStatusCode() == HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED) {
|
||||
authenticateHeader = getMethod.getResponseHeader("Proxy-Authenticate");
|
||||
}
|
||||
@ -452,8 +452,8 @@ public final class DavGatewayHttpClientFacade {
|
||||
if ("NTLM".equalsIgnoreCase(headerElement.getName())) {
|
||||
acceptNTLM = true;
|
||||
}
|
||||
if ("Basic".equalsIgnoreCase(headerElement.getName())) {
|
||||
acceptBasic = true;
|
||||
if ("Basic realm".equalsIgnoreCase(headerElement.getName())) {
|
||||
acceptBasic = true;
|
||||
}
|
||||
}
|
||||
return acceptNTLM && !acceptBasic;
|
||||
|
Loading…
x
Reference in New Issue
Block a user