I agree that it looks like a good solution to make middleware execute such straightforward tasks as compression, and only extend Rails URL helpers. I am not sure i would be able to do something about this myself, looks like more work than just changing the parsing rules.
All examples of double extensions i can think of would be of the following two types:
- a file foo.ext1.ext2 after some processing allows to recover the file foo.ext1.
Examples: foo.csv.zip, foo.tar.gz, foo.css.sass, foo.html.erb
- the first extension is a custom one, and the second is a “legal” one.
Examples: foo.source.txt, foo.miminized.js