Eyepea / aiosip

SIP support for AsyncIO (DEPRECATED)
Apache License 2.0
83 stars 43 forks source link

Pad noncecount. #142

Open kousu opened 4 years ago

kousu commented 4 years ago

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.

kousu commented 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