Ok Zoran, the important part first:
> I'm thinking about allowing *changes* to/of this repository
> during the runtime. This way one could override a ns_param
> value assigned at startup or create entirely new ns_section
> and stuff it with bunch of ns_param so others may call
> [ns_config] to get it.
I'm all for it if it is possible. It saves us server restarts for dumb issues
like increasing maximum post sizes etc.
Problems: I can change stacksize to "0". I can tell fastpath to use 1 byte of
memory instead 5 megs. Is memory freed? I guess it comes down to "You are
able to change everything - but be sure you now what you are doing".
The other part: It would be nice to have the dictionary of config sections and
options along with their defaults that is created when you set logmaxlevel
to "6" (dev) or "5" (debug) in section ns/parameters...
-----------------------------------------------------------------
[...]
Debug: config section: ns/server/default
Debug: config: ns/server/default:realm value="(null)" default="default"
(string)
Debug: config: ns/server/default:checkmodifiedsince value=(null) default=true
(bool)
Debug: config: ns/server/default:flushcontent value=false default=false (bool)
Debug: config: ns/server/default:noticedetail value=(null) default=true (bool)
Debug: config: ns/server/default:errorminsize value=(null) min=-2147483648
max=2147483647 default=514 (int)
Debug: config: ns/server/default:headercase value="(null)" default="preserve"
(string)
Debug: config: ns/server/default:outputCharset value=(null) (string)
Debug: config: ns/server/default:HackContentType value=(null) (bool)
Debug: config: ns/server/default:urlCharset value=(null) (string)
[...]
-----------------------------------------------------------------
...available as TCL command like ns_configsections.
For the sake of the argument, e.g. "ns_startupconfigsections".
It must be the list created at server startup that DOES NOT CONTAIN entries
like
ns_section milly/vanilly
ns_param fate 1
As far as I can tell this is possible because simply because a value was not
requested by Ns_Config* (Int/Range whatever) commands means it is irrelevant
for the server. At least in a sense of "get things right for startup".
Default values are set by these commands.
I think the listing above does also only list those and would not list
milly/vanilly section and options. Maybe it's already there.
Only then I am able to utilize TCL to diff and compare and return results
like "milly/vanilly" section may be bogus or a typo. Or that
parameter "stacksize" does not belong to section "fastpath".
And, as a bonus, I can create a table of options, their defaults, types and
minimum or maximum value.
Bernd.