Remove unquote from the url method in CachedFilesMixin #321

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants

idanz commented Sep 4, 2012

The unquote in the end of the url method, might change the url that is generated from the storage.
This, for instance, breaks S3BotoStorage, since the Signature query parameter becomes invalid after unquoting.

@idanz idanz Update django/contrib/staticfiles/storage.py
The unquote in the end of the url method, might change the url that is generated from the storage.
This, for instance, breaks S3BotoStorage, since the Signature query parameter becomes invalid after unquoting.
eeb1438
Member

mjtamlyn commented Sep 4, 2012

This is unquoted in (at least) 1.4.X, have you have problems on that version? I'm struggling to trace when this change was introduced as the code around it has been changed a bit recently.

idanz commented Sep 4, 2012

I think I wasn't clear, the "unquote" IS the problem
since the url method in the storage does not unqoute , and the one in CachedFilesMixin does unquote, you get different behavior, which breaks how the AWS signature is generated in the final url so consequently some of the urls do not work.
The CachedFilesMixin was introduced in 1.4 if I am not mistaken, so it was probably introduced there.

Member

kmtracey commented Sep 8, 2012

I think we need a trac ticket (https://code.djangoproject.com/newticket) to more fully understand what the problem is with trying to combine use of S3BotoStorage and CachedFilesMixin. Simply removing the unquote as is done here breaks three existing tests, so we need to understand if those tests are somehow incorrect or if there is some other way to handle the combining of these two things that doesn't require removing the unqote.

kmtracey closed this Sep 8, 2012

@sztrovacsek sztrovacsek pushed a commit to sztrovacsek/django that referenced this pull request Mar 7, 2015

@evildmp evildmp Merge pull request #321 from evildmp/various_merges
Various merges
64e1950

@nanuxbe nanuxbe pushed a commit to nanuxbe/django that referenced this pull request Jul 2, 2016

@jezdez jezdez Fix issue #321 - Document static and template file locations. 469e4b9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment