Skip to content

Commit 23f7d3f

Browse files
author
Stephane Landelle
committed
Fix NTLM, close AsyncHttpClient#730
1 parent 88b9c20 commit 23f7d3f

File tree

7 files changed

+729
-410
lines changed

7 files changed

+729
-410
lines changed

api/src/main/java/org/asynchttpclient/Realm.java

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ public class Realm {
4848
private final boolean usePreemptiveAuth;
4949
private final Charset charset;
5050
private final String host;
51-
private final boolean messageType2Received;
5251
private final String ntlmDomain;
5352
private final boolean useAbsoluteURI;
5453
private final boolean omitQuery;
@@ -60,7 +59,7 @@ public enum AuthScheme {
6059

6160
private Realm(AuthScheme scheme, String principal, String password, String realmName, String nonce, String algorithm, String response,
6261
String qop, String nc, String cnonce, Uri uri, String method, boolean usePreemptiveAuth, String ntlmDomain, Charset charset,
63-
String host, boolean messageType2Received, String opaque, boolean useAbsoluteURI, boolean omitQuery, boolean targetProxy) {
62+
String host, String opaque, boolean useAbsoluteURI, boolean omitQuery, boolean targetProxy) {
6463

6564
this.principal = principal;
6665
this.password = password;
@@ -78,7 +77,6 @@ private Realm(AuthScheme scheme, String principal, String password, String realm
7877
this.usePreemptiveAuth = usePreemptiveAuth;
7978
this.ntlmDomain = ntlmDomain;
8079
this.host = host;
81-
this.messageType2Received = messageType2Received;
8280
this.charset = charset;
8381
this.useAbsoluteURI = useAbsoluteURI;
8482
this.omitQuery = omitQuery;
@@ -173,10 +171,6 @@ public String getNtlmHost() {
173171
return host;
174172
}
175173

176-
public boolean isNtlmMessageType2Received() {
177-
return messageType2Received;
178-
}
179-
180174
public boolean isUseAbsoluteURI() {
181175
return useAbsoluteURI;
182176
}
@@ -275,7 +269,6 @@ public static class RealmBuilder {
275269
private String ntlmDomain = System.getProperty("http.auth.ntlm.domain", "");
276270
private Charset charset = UTF_8;
277271
private String host = "localhost";
278-
private boolean messageType2Received;
279272
private boolean useAbsoluteURI = true;
280273
private boolean omitQuery;
281274
private boolean targetProxy;
@@ -415,11 +408,6 @@ public RealmBuilder setUsePreemptiveAuth(boolean usePreemptiveAuth) {
415408
return this;
416409
}
417410

418-
public RealmBuilder setNtlmMessageType2Received(boolean messageType2Received) {
419-
this.messageType2Received = messageType2Received;
420-
return this;
421-
}
422-
423411
public boolean isUseAbsoluteURI() {
424412
return useAbsoluteURI;
425413
}
@@ -494,7 +482,6 @@ public RealmBuilder clone(Realm clone) {
494482
setUsePreemptiveAuth(clone.getUsePreemptiveAuth());
495483
setNtlmDomain(clone.getNtlmDomain());
496484
setNtlmHost(clone.getNtlmHost());
497-
setNtlmMessageType2Received(clone.isNtlmMessageType2Received());
498485
setUseAbsoluteURI(clone.isUseAbsoluteURI());
499486
setOmitQuery(clone.isOmitQuery());
500487
setTargetProxy(clone.isTargetProxy());
@@ -623,7 +610,7 @@ public Realm build() {
623610
}
624611

625612
return new Realm(scheme, principal, password, realmName, nonce, algorithm, response, qop, nc, cnonce, uri, methodName,
626-
usePreemptive, ntlmDomain, charset, host, messageType2Received, opaque, useAbsoluteURI, omitQuery, targetProxy);
613+
usePreemptive, ntlmDomain, charset, host, opaque, useAbsoluteURI, omitQuery, targetProxy);
627614
}
628615
}
629616
}

0 commit comments

Comments
 (0)