Skip to content

Commit 1b60189

Browse files
committed
chore: set nonce count only if available
1 parent d23c732 commit 1b60189

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mods/edgeport/src/main/java/io/routr/headers/AuthorizationConverter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,11 @@ public Authorization fromDTO(io.routr.message.Authorization dto)
5656
HeaderFactory factory = SipFactory.getInstance().createHeaderFactory();
5757
AddressFactory addrFactory = SipFactory.getInstance().createAddressFactory();
5858
Authorization header = (Authorization) factory.createAuthorizationHeader(dto.getScheme());
59-
header.setNonceCount(dto.getNonceCount());
59+
6060
header.setRealm(dto.getRealm());
6161
header.setOpaque(dto.getOpaque());
6262

63+
if (dto.getNonceCount() > -1) header.setNonceCount(dto.getNonceCount());
6364
if (!dto.getNonce().isEmpty()) header.setNonce(dto.getNonce());
6465
if (!dto.getCNonce().isEmpty()) header.setCNonce(dto.getCNonce());
6566
if (!dto.getAlgorithm().isEmpty()) header.setAlgorithm(dto.getAlgorithm());

0 commit comments

Comments
 (0)