You have asked this question before:
Sorry Gustaf, I thought I had asked aolserver before, not naviserver. At any
rate, still no good solution to this, other than adding a tcl filter that
captures and potentially rewrites all requests.
However, one does not want to run the filter on every requests,
Agreed.
and the approach should be compatible with the way how NaviServer configuration
works for choosing on which files the ADP parser should be used. This is
happening now via ns_register_adp (see [1]) using a config section like:
ns_section "ns/server/default/adp"
ns_param map /*.adp
ns_param disabled false
Another approach would be for that map to be defined for no-extension files,
perhaps something like this:
ns_param map /*?^[\.]
but such pattern matching isn't (to my knowledge) supported.
One approach would be to allow mapping rules for the URLspace machinery for
empty extensions (something, which does not exist yet). Such a mapping rule
could be used for a filter for only urls without extensions, or it could be
used to map adp pages with empty extensions with "ns_register_adp" like above
and let the ADP "PageRequest" check, if a file with ".adp" exists. Such a
syntactic rule for for the URLspace could be used as well in other operations
on the URLspace (for registering procs, connection pool mapping, ns_urlspace,
etc.). This would be backward compatible and avoid overall overhead....
I quite like your suggestion, which I assume would be something like this:
ns_section "ns/server/default/adp"
ns_param enable_when_no_extension true
ns_param disabled false
that’s more or less what I’ve implemented with my hack.
PS: As we are using on our main sites OpenACS, we do not have this problem,
since OpenACS defines its own "request processor" which handles every URL.
I see.
-john
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel