Open kousu opened 4 years ago
A better approach might be to replace most of _calculate_response()
with urllib.request.AbstractDigestAuthHandler.get_authorization(). SIP reuses that algorithm but with some strictness tweaks: https://tools.ietf.org/html/rfc3261#section-22.4
I am pretty sure padding 'noncecount' out to a 8-digit non-quoted number is part of the spec, though it seems not many implementations care. For what it's worth, cpython does it: https://hg.python.org/cpython/file/tip/Lib/urllib/request.py#l1152
There's probably a tidier way to do this.