Skip to content

Commit 84921d1

Browse files
author
Stephane Landelle
committed
fix to enable client-specified nonce count (NC), port AsyncHttpClient#786 on master
1 parent 036bc73 commit 84921d1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
*/
3333
public class Realm {
3434

35-
private static final String NC = "00000001";
35+
private static final String DEFAULT_NC = "00000001";
3636

3737
private final String principal;
3838
private final String password;
@@ -263,7 +263,7 @@ public static class RealmBuilder {
263263
private String response = "";
264264
private String opaque = "";
265265
private String qop = "auth";
266-
private String nc = "00000001";
266+
private String nc = DEFAULT_NC;
267267
private String cnonce = "";
268268
private Uri uri;
269269
private String methodName = "GET";
@@ -565,7 +565,7 @@ private void newResponse() {
565565

566566
if (isNonEmpty(qop)) {
567567
//qop ="auth" or "auth-int"
568-
sb.append(NC)//
568+
sb.append(nc)//
569569
.append(':')//
570570
.append(cnonce)//
571571
.append(':')//

0 commit comments

Comments
 (0)