#27201: Django 1.10 with STATICFILES_STORAGE breaks on absolute path in CSS with double slash --------------------------------------+------------------------------------ Reporter: andrewbadr | Owner: nobody Type: Cleanup/optimization | Status: new Component: contrib.staticfiles | Version: 1.10 Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 --------------------------------------+------------------------------------
Comment (by aaugustin): '''Regarding path normalization in general''' I don't care either way (which I why I haven't commented). I don't mind if sloppy coding results in exceptions. I don't mind either if we restore some form normalization -- as long as it's done properly, unlike the implementation I removed. Normalizing redundant slashes should only touch the path, not the other bits of the URL. You need to parse it and reassemble the URL. '''Regarding this bug report''' Based on the example shown in the report, I suspect the problem only arises if the duplicate slash is found just after STATIC_URL, which Django strips at some point (if memory serve). Stripping slashes on the left of the URL just after stripping STATIC_URL could be the correct resolution here. If so, it should be fairly easy to write a patch and a test. -- Ticket URL: <https://code.djangoproject.com/ticket/27201#comment:7> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/068.9276ed0f89be1ff19d8fa69b8cb729e4%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.