Skip to content

Pad noncecount.#142

Open
kousu wants to merge 1 commit intoEyepea:masterfrom
kousu:patch-1
Open

Pad noncecount.#142
kousu wants to merge 1 commit intoEyepea:masterfrom
kousu:patch-1

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

Comments