Skip to content

Commit 4f421a0

Browse files
dwickernslandelle
authored andcommitted
Fix NullPointerException in NTLM auth (AsyncHttpClient#1386)
1 parent 06c58c6 commit 4f421a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client/src/main/java/org/asynchttpclient/ntlm/NtlmEngine.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,12 @@ private static String stripDotSuffix(final String value) {
150150

151151
/** Convert host to standard form */
152152
private static String convertHost(final String host) {
153-
return stripDotSuffix(host).toUpperCase();
153+
return host != null ? stripDotSuffix(host).toUpperCase() : null;
154154
}
155155

156156
/** Convert domain to standard form */
157157
private static String convertDomain(final String domain) {
158-
return stripDotSuffix(domain).toUpperCase();
158+
return domain != null ? stripDotSuffix(domain).toUpperCase() : null;
159159
}
160160

161161
private static int readULong(final byte[] src, final int index) throws NtlmEngineException {

0 commit comments

Comments
 (0)