Allow file server items to re-map URI paths to a different path
|Reported by:||Nicklas Nordborg||Owned by:||everyone|
A file item that is a reference to an external file define an absolute URI in the form:
When the file item is linked with a
FileServer item the file server replaces the
host part with the host and port defined by the file server. Eg.
http://host.org/doc.txt could be re-mapped to
In some cases it would be useful to also be able to re-map the
path part. For example if someone wants to implement a
sftp:// protocol handler it would not be advisable to be able to get *any* file on the server by saying
It would be useful if the file server item defines a 'safe' root path that is automatically added to the file URI. Eg.
file:///path/to/data is re-mapped to
In this case we must also make sure that the URI doesn't contain '..' to move upwards in the directory structure thereby bypassing the safe root path.