diff --git a/src/utils.ts b/src/utils.ts index 1f24c44..91f5363 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -98,7 +98,8 @@ export function digestAuthHeader(method: string, uri: string, wwwAuthenticate: s } let qop = opts.qop || ''; - const [ user, pass ] = userpass.split(':'); + const user = userpass.split(':', 1); + const pass = userpass.slice(user[0].length+1); let nc = String(++NC); nc = `${NC_PAD.substring(nc.length)}${nc}`;