nsvfs - Replacement commands which use the Tcl VFS for file access.
nsvfs provides replacements for the builtin naviserver commands which access the file system to serve content. The commands here use the Tcl VFS.
Although slower, this is useful for creating single-file install images, such as starkits.
A replacement for the ns_register_fastpath command, using the Tcl VFS for file system access.
To ensure that all static content uses the Tcl VFS, replace the naviserver core fastpath handler by running the following code in your tcl library:
vfs_register_fastpath GET /* vfs_register_fastpath HEAD /* vfs_register_fastpath POST /*
You may also decide to register the vfs routines for a subset of the URL hierarchy, such as /admin/*. In this case you could serve admin pages from within the starkit bundle and aditional static pages using the normal fastpath handler.
A replacement for the ns_returnfile command, using the Tcl VFS for file system access. No caching is performed.
A replacement for the ns_respond command, using the Tcl VFS for file system access. No caching is performed.
ns_register_fastpath, ns_respond, ns_returnfile