Feature #532
expand symlinks before checking filename extension
| Status: | Wontfix | Start: | ||
| Priority: | Normal | Due date: | ||
| Assigned to: | - | % Done: | 0% |
|
| Category: | core | |||
| Target version: | - | |||
| Pending: | No |
Resolution: | wontfix |
|
| Patch available: |
Description
IMHO, symlinks should be expanded before checking the filename extension. For example, if I have link.foo as a symlink to bar.png, then when I download link.foo, it should be returned as a image/png instead of a application/octet-stream. Alternatively, if I have link.foo as a symlink to bar.php, then when I load link.foo, it should execute the PHP script instead of downloading as an application/octet-stream.
(e.g. I used this trick an a different http server to set up simple redirects, by symlinking foo.html to foo.redir, where foo.redir is a text file that contains the new location, and is interpreted by an external program. So the http server, when a user tries to visit foo.html, sees the symlink to foo.redir, notices the .redir extension, and runs the external program which spits out the right headers to redirect the user to the right page.)
-- hubert