Hi, I came across this while trying to turn fastpath directorylisting off. From the docs:
directorylisting Style of directory listings, Can be *fancy* or *simple*. (string, defaults to simple) directoryproc Name of Tcl proc to use to display directory listings. One can either specify *directoryproc*, or *directoryadp*, but not both. (string, defaults to _ns_dirlist) The docs don't explicitly say how to disable them as far as I can see. But fastpath.tcl seems to default to a value of "none" if no config value is set. Should Naviserver support this value explicitly? I tried: ns_param directorylisting none This then gave be a Tcl error: invalid command name "none" while executing "none" while executing callback ns:tclrequest none (context: request proc) It seems the value "none" is being used as the directoryproc. When directoryproc is not set, and directorylisting is not "simple" or "fancy", dirproc is set to p which will be "none": p = Ns_ConfigString(path, "directorylisting", "simple"); if (p != NULL && (STREQ(p, "simple") || STREQ(p, "fancy"))) { p = "_ns_dirlist"; } servPtr->fastpath.dirproc = Ns_ConfigString(path, "directoryproc", p); To make fastpath return a 404 instead of a dir listing I needed both : ns_param directorylisting none ns_param directoryproc _ns_dirlist Is there another way of doing this? Strikes me that directoryproc should default to _ns_dirlist no matter what directorylisting is set to? Could naviserver drop this check in fastpath.c, and leave the default value of directorylisting to be set in fastpath.tcl as in the following commit? https://bitbucket.org/davidqc/naviserver/commits/afd8de3e5bdc6813ab49c6bc5713faeaaf68b854 Regards, -- David Osborne Qcode Software Limited
------------------------------------------------------------------------------
_______________________________________________ naviserver-devel mailing list naviserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/naviserver-devel