Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pad noncecount. #142

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Pad noncecount. #142

wants to merge 1 commit into from

Conversation

kousu
Copy link

@kousu kousu commented Jun 15, 2020

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.

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
@kousu
Copy link
Author

kousu commented Jun 15, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant