[3.8] Fix #1593 : "download" query parameter is not working anymore on permalink URIs