Closed syelle closed 11 years ago
I made a fix for a similar issue on the feature/md5 branch at a74c12b1a912df33391a7fea27a2239fc724eeb5 might be related.
(just jumping in from Code Triage) email.
Yep, this appears to fix the issue. Just looking like it needs to be merged in. @syelle, can you confirm the branch fixes the problem and we can close this in as duplicate/fixed?
P.S. the md5 branch isn't merged yet because there is an issue when running tests on travis-ci. Haven't got time to track it down yet.
@tundramonkey We've not tested that branch to see if it fixed things, but based on the commit diff @j15e posted it seems directed at fixing things with the destination files (i.e. making sure the MD5 hash is in all test cases and that the gem doesn't serve a file if you append a few etra characters to the hash). I didn't see anything that jumped out as addressing our issue specifically, which is that you cannot specify a source file with more than two dots in the name.
I have an app here that uses http://localhost:9292/js/vendor/jquery-1.9.1.min.js and it works.
I made a specific test case for this here and I am pretty sure this was fixed in the master branch earlier with this commit. I added the test because it would not work in the pull request made for MD5 hashes at fist (now fixed too on my branch md5 I think).
When you try to get the assetpack to compile a file with more than 2 dots in the name, the file generates with an error indicating that Sinatra received a 404 when trying to retrieve the original asset.
Files with 2 dots in the names appears to be fine, however.
We've worked around the issue by replacing dots with dashes.
Example
Error