Skip to content

Etag + md5 question #1743

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

Closed
Carreau opened this issue Oct 8, 2015 · 2 comments
Closed

Etag + md5 question #1743

Carreau opened this issue Oct 8, 2015 · 2 comments
Labels
Needed: patch A pull request is required Needed: tests Tests are required

Comments

@Carreau
Copy link
Contributor

Carreau commented Oct 8, 2015

I'm playing with python3 conversion, and came across the following :

I see that here the Etag is set to a md5.new(url) object. Shouldn't it be the md5.new(url).hexdigest() ? Or does django do some magic ?

Thanks.

@ericholscher
Copy link
Member

Perhaps -- It would be great to get a test for this showing it failing, and a patch that fixes it.

@agjohnson agjohnson added Needed: tests Tests are required Needed: patch A pull request is required labels Oct 10, 2015
@berkerpeksag
Copy link
Member

Actually, it should use the hashlib module. md5 has been deprecated since Python 2.5. However, it seems like the else branch in _badge_return is unused. _badge_return used by the project_badge view which passes redirect=True by default. I will open a pull request to simply it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needed: patch A pull request is required Needed: tests Tests are required
Projects
None yet
Development

No branches or pull requests

4 participants