<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://panoptic.com/mediawiki/aolserver/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lemuelf</id>
	<title>AOLserver Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://panoptic.com/mediawiki/aolserver/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lemuelf"/>
	<link rel="alternate" type="text/html" href="https://panoptic.com/wiki/aolserver/Special:Contributions/Lemuelf"/>
	<updated>2026-04-21T09:42:37Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_respond&amp;diff=5327</id>
		<title>Ns respond</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_respond&amp;diff=5327"/>
		<updated>2009-05-06T12:22:24Z</updated>

		<summary type="html">&lt;p&gt;Lemuelf: wiki-formatted the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''NAME'''&lt;br /&gt;
: ns_respond - Build a complete response&lt;br /&gt;
&lt;br /&gt;
'''SYNOPSIS'''&lt;br /&gt;
: '''ns_respond''' ''?-status status? ?-type type? {?-string string? | ?-file file? | ?-fileid fileid? } ?-length length? ?-headers setId?''&lt;br /&gt;
&lt;br /&gt;
'''DESCRIPTION'''&lt;br /&gt;
&lt;br /&gt;
: ns_respond builds a complete response for the client with all of the specified information in the header.&lt;br /&gt;
&lt;br /&gt;
'''EXAMPLE'''&lt;br /&gt;
&lt;br /&gt;
: Using ns_respond, it's easy to do an HTTP redirect:&lt;br /&gt;
&lt;br /&gt;
 set headers [ns_set new myheaders]&lt;br /&gt;
 ns_set put $headers location &amp;lt;nowiki&amp;gt;http://www.aolserver.com&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 ns_respond -status 302 -type text/plain \&lt;br /&gt;
 	-string &amp;quot;redirection&amp;quot; -headers $headers&lt;/div&gt;</summary>
		<author><name>Lemuelf</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Tcl_API&amp;diff=5319</id>
		<title>Tcl API</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Tcl_API&amp;diff=5319"/>
		<updated>2009-02-12T08:18:43Z</updated>

		<summary type="html">&lt;p&gt;Lemuelf: /* Custom data structures and variable manipulation commands */ Removed &amp;quot;Network Shared Variables&amp;quot; in the NSV heading, since nothing is network-shared and I believe it stood for &amp;quot;NaviServer Variables&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Links to all of the Tcl commands provided by the AOLserver core &amp;quot;out of the box&amp;quot;.  To view a complete list of these commands in alphabetical order, try the [[:Category:Core Tcl API]] page.&lt;br /&gt;
&lt;br /&gt;
Like what you see here?  Want to try your hand at documenting a command, too?  Here's [[how to document the core Tcl API]].&lt;br /&gt;
&lt;br /&gt;
== ADP commands ==&lt;br /&gt;
&lt;br /&gt;
: [[ns_adp_abort]], [[ns_adp_append]], [[ns_adp_argc]], [[ns_adp_argv]], [[ns_adp_bind_args]], [[ns_adp_break]], [[ns_adp_debug]], [[ns_adp_debuginit]], [[ns_adp_dir]], [[ns_adp_dump]], [[ns_adp_eval]], [[ns_adp_exception]], [[ns_adp_include]], [[ns_adp_mime]], [[ns_adp_mimetype]], [[ns_adp_parse]], [[ns_adp_puts]] ([[ns_puts]]), [[ns_adp_registeradp]], [[ns_adp_registerproc]], [[ns_adp_registertag]], [[ns_adp_return]], [[ns_adp_safeeval]], [[ns_adp_stats]], [[ns_adp_stream]], [[ns_adp_tell]], [[ns_adp_trunc]]&lt;br /&gt;
&lt;br /&gt;
: [[ns_browsermatch]]&lt;br /&gt;
&lt;br /&gt;
: [[ns_conn]], [[ns_conncptofp]], [[ns_connsendfp]]&lt;br /&gt;
&lt;br /&gt;
: [[ns_getform]], [[ns_getformfile]]&lt;br /&gt;
&lt;br /&gt;
: [[ns_queryexists]], [[ns_queryget]], [[ns_querygetall]]&lt;br /&gt;
&lt;br /&gt;
: [[ns_return]], [[ns_returnadminnotice]], [[ns_returnbadrequest]], [[ns_returnerror]], [[ns_returnfile]], [[ns_returnforbidden]], [[ns_returnfp]], [[ns_returnnotfound]], [[ns_returnnotice]], [[ns_returnok]], [[ns_returnredirect]], [[ns_returnunauthorized]], &lt;br /&gt;
&lt;br /&gt;
: [[ns_setexpires]], [[ns_setformencoding]]&lt;br /&gt;
&lt;br /&gt;
: [[ns_startcontent]], [[ns_write]], [[ns_writecontent]], [[ns_writefp]]&lt;br /&gt;
&lt;br /&gt;
== Cache commands ==&lt;br /&gt;
&lt;br /&gt;
: [[ns_cache]], [[ns_cache_flush]], [[ns_cache_keys]], [[ns_cache_names]], [[ns_cache_size]], [[ns_cache_stats]]&lt;br /&gt;
&lt;br /&gt;
== Concurrent programming commands ==&lt;br /&gt;
&lt;br /&gt;
: [[ns_cond]], [[ns_critsec]], [[ns_event]], [[ns_job]], [[ns_kill]], [[ns_mutex]], [[ns_sema]], [[ns_thread]]&lt;br /&gt;
&lt;br /&gt;
== Custom data structures and variable manipulation commands ==&lt;br /&gt;
* TclX keyed lists:&lt;br /&gt;
&lt;br /&gt;
: [[keyldel]], [[keylget]], [[keylkeys]], [[keylset]]&lt;br /&gt;
* [[Thread-shared Variables]] (NSVs):&lt;br /&gt;
&lt;br /&gt;
: [[nsv_get]], [[nsv_exists]], [[nsv_set]], [[nsv_incr]], [[nsv_append]], [[nsv_lappend]], [[nsv_array]], [[nsv_unset]], [[nsv_names]]&lt;br /&gt;
* Sets and multisets:&lt;br /&gt;
&lt;br /&gt;
: [[ns_findset]], [[ns_set]]&lt;br /&gt;
* ???&lt;br /&gt;
&lt;br /&gt;
: [[ns_share]], [[ns_var]]&lt;br /&gt;
&lt;br /&gt;
== Database commands ==&lt;br /&gt;
&lt;br /&gt;
: [[ns_buildsqldate]], [[ns_buildsqltime]], [[ns_buildsqltimestamp]], [[ns_db]], [[ns_dbquotename]], [[ns_dbquotevalue]], [[ns_localsqltimestamp]], [[ns_parsesqldate]], [[ns_parsesqltime]], [[ns_parsesqltimestamp]], [[ns_writecsv]]&lt;br /&gt;
&lt;br /&gt;
== DNS lookup commands ==&lt;br /&gt;
&lt;br /&gt;
: [[ns_addrbyhost]], [[ns_hostbyaddr]]&lt;br /&gt;
&lt;br /&gt;
== File manipulation commands ==&lt;br /&gt;
&lt;br /&gt;
: [[ns_chmod]], [[ns_cp]], [[ns_ftruncate]], [[ns_link]], [[ns_mkdir]], [[ns_mktemp]], [[ns_normalizepath]], [[ns_openexcl]], [[ns_purgefiles]], [[ns_rename]], [[ns_rmdir]], [[ns_rollfile]], [[ns_symlink]], [[ns_tmpnam]], [[ns_truncate]], [[ns_unlink]]&lt;br /&gt;
&lt;br /&gt;
== HTML manipulation commands ==&lt;br /&gt;
&lt;br /&gt;
: [[ns_formvalueput]], [[ns_hrefs]], [[ns_htmlselect]], [[ns_quotehtml]], [[ns_striphtml]], [[ns_tagelement]], [[ns_tagelementset]]&lt;br /&gt;
&lt;br /&gt;
== HTTP commands ==&lt;br /&gt;
&lt;br /&gt;
: [[ns_http]], [[ns_httpget]], [[ns_httpopen]], [[ns_httppost]]&lt;br /&gt;
&lt;br /&gt;
== Image manipulation commands ==&lt;br /&gt;
&lt;br /&gt;
: [[ns_gifsize]], [[ns_jpegsize]]&lt;br /&gt;
&lt;br /&gt;
== Internationalization (I18N) support commands ==&lt;br /&gt;
&lt;br /&gt;
: [[ns_charsets]], [[ns_choosecharset]], [[ns_cookiecharset]], [[ns_encodingforcharset]], [[ns_encodingfortype]], [[ns_formfieldcharset]], [[ns_urlcharset]]&lt;br /&gt;
&lt;br /&gt;
== Logging commands ==&lt;br /&gt;
&lt;br /&gt;
: [[ns_accesslog]], [[ns_log]], [[ns_logctl]], [[ns_logroll]]&lt;br /&gt;
&lt;br /&gt;
== Request authorization commands ==&lt;br /&gt;
&lt;br /&gt;
: [[ns_checkurl]], [[ns_requestauthorize]]&lt;br /&gt;
&lt;br /&gt;
== Request processing commands ==&lt;br /&gt;
&lt;br /&gt;
: [[ns_register_proc]], [[ns_unregister_proc]]&lt;br /&gt;
&lt;br /&gt;
== Scheduling commands ==&lt;br /&gt;
&lt;br /&gt;
: [[ns_after]], [[ns_atclose]], [[ns_atexit]], [[ns_atshutdown]], [[ns_atsignal]], [[ns_cancel]], [[ns_pause]], [[ns_resume]], [[ns_schedule_proc]], [[ns_schedule_daily]], [[ns_schedule_weekly]], [[ns_shutdown]], [[ns_unschedule_proc]]&lt;br /&gt;
&lt;br /&gt;
== Server configuration commands ==&lt;br /&gt;
&lt;br /&gt;
: [[ns_config]], [[ns_configsection]], [[ns_configsections]], [[ns_library]], [[ns_limits]], [[ns_modulepath]], [[ns_param]], [[ns_pools]], [[ns_section]]&lt;br /&gt;
&lt;br /&gt;
== Server introspection commands ==&lt;br /&gt;
&lt;br /&gt;
: [[ns_env]], [[ns_info]], [[ns_server]], [[ns_stats]]&lt;br /&gt;
&lt;br /&gt;
== Socket I/O commands ==&lt;br /&gt;
&lt;br /&gt;
: [[ns_sock]], [[ns_sockaccept]], [[ns_sockblocking]], [[ns_sockcallback]], [[ns_sockcheck]], [[ns_sockclose]], [[ns_sockdup]], [[ns_sockerrno]], [[ns_socketpair]], [[ns_sockioctl]], [[ns_socklisten]], [[ns_socklistencallback]], [[ns_socknbclose]], [[ns_socknonblocking]], [[ns_socknread]], [[ns_sockopen]], [[ns_sockpair]], [[ns_sockreadwait]], [[ns_sockselect]], [[ns_socksend]], [[ns_sockstrerror]]&lt;br /&gt;
&lt;br /&gt;
== Tcl channel management commands ==&lt;br /&gt;
&lt;br /&gt;
: [[ns_chan]], [[ns_cleanupchans]], [[ns_getchannels]]&lt;br /&gt;
&lt;br /&gt;
== Tcl interpreter management commands ==&lt;br /&gt;
&lt;br /&gt;
: [[ns_cleanup]], [[ns_eval]], [[ns_ictl]], [[ns_init]], [[ns_markfordelete]], [[ns_reinit]]&lt;br /&gt;
&lt;br /&gt;
== Time commands ==&lt;br /&gt;
&lt;br /&gt;
: [[ns_fmttime]], [[ns_gmtime]], [[ns_httptime]], [[ns_localtime]], [[ns_parsehttptime]], [[ns_parsetime]], [[ns_time]]&lt;br /&gt;
   &lt;br /&gt;
== Uncategorized ==&lt;br /&gt;
&lt;br /&gt;
: [[ns_cpfp]], [[ns_crypt]], [[ns_geturl]], [[ns_guesstype]], [[ns_headers]], [[ns_isformcached]], [[ns_issmallint]], [[ns_paren]], [[ns_parseheader]], [[ns_parsequery]], [[ns_rand]], [[ns_register_adptag]], [[ns_register_adp]], [[ns_register_filter]], [[ns_register_trace]], [[ns_resetcachedform]], [[ns_sendmail]], [[ns_sleep]], [[ns_sourceproc]], [[ns_unregister_adp]], [[ns_updateheader]], [[ns_url2file]], [[ns_urldecode]], [[ns_urlencode]], [[ns_uudecode]], [[ns_uuencode]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Lemuelf</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Thread-shared_Variables&amp;diff=5316</id>
		<title>Thread-shared Variables</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Thread-shared_Variables&amp;diff=5316"/>
		<updated>2009-02-09T07:38:18Z</updated>

		<summary type="html">&lt;p&gt;Lemuelf: removed &amp;quot;aka Network Shared Variables or NSVs&amp;quot; because nothing is shared in the network and it just confuses people how nsvs work&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The nsv commands provide a high performance data sharing mechanism. This facility is a more flexible alternative to the obsolete [[ns_share]] command. The model uses an array syntax and includes more features. In addition, lock contention is managed in a much more scalable way--something that is not possible with the obsolete [[ns_share]] facility.&lt;br /&gt;
* [[nsv_get]] - get key value &lt;br /&gt;
* [[nsv_exists]] - check key existence &lt;br /&gt;
* [[nsv_set]] - set key value&lt;br /&gt;
* [[nsv_append]] - append value &lt;br /&gt;
* [[nsv_lappend]] - append value as list element &lt;br /&gt;
* [[nsv_incr]] - increment and return value &lt;br /&gt;
* [[nsv_unset]] - unset a value &lt;br /&gt;
* [[nsv_array]] - manage nsv arrays &lt;br /&gt;
* [[nsv_names]] - list the nsvs in use&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Commands for the most part mirror the corresponding Tcl command for ordinary variables. Basically, to set a value, simply use the nsv_set command:&lt;br /&gt;
&lt;br /&gt;
    nsv_set myarray foo $value&lt;br /&gt;
&lt;br /&gt;
and to get a value, simply use the nsv_get command:&lt;br /&gt;
&lt;br /&gt;
    set value [nsv_get myarray foo]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What is the difference between nsv_set and nsv_array set? Is it exactly the same as the difference between set and array set?&lt;br /&gt;
&lt;br /&gt;
'''Multithreading Features'''&lt;br /&gt;
&lt;br /&gt;
One advantages of nsv is built in interlocking for thread safety. For example, consider a case of a &amp;quot;increment-by-one&amp;quot; unique id system. Here's the [[ns_share]] solution:&lt;br /&gt;
&lt;br /&gt;
    ns_share ids &lt;br /&gt;
    set ids(lock) [ns_mutex create]&lt;br /&gt;
    set ids(next) 0&lt;br /&gt;
&lt;br /&gt;
    proc nextid {} { &lt;br /&gt;
        ns_share ids &lt;br /&gt;
        ns_mutex lock $ids(lock) &lt;br /&gt;
        set next [incr ids(next)]&lt;br /&gt;
        ns_mutex unlock $ids(lock) &lt;br /&gt;
        return $next &lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
and here's an nsv solution:&lt;br /&gt;
&lt;br /&gt;
    nsv_set ids next 0&lt;br /&gt;
&lt;br /&gt;
    proc nextid {} { &lt;br /&gt;
        return [nsv_incr ids next]&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
Note that the nsv solution does not need a mutex as the [[nsv_incr]] command is internally interlocked.&lt;br /&gt;
&lt;br /&gt;
'''Compatibility with Tcl Arrays'''&lt;br /&gt;
&lt;br /&gt;
Another useful feature of nsv is the [[nsv_array]] command which works much like the Tcl array command. This can be used to import and export values from ordinary Tcl arrays. For example, to copy from Tcl use:&lt;br /&gt;
&lt;br /&gt;
    nsv_array set meta [array get tmpmeta]&lt;br /&gt;
&lt;br /&gt;
and to copy to Tcl use:&lt;br /&gt;
&lt;br /&gt;
    array set metacopy [nsv_array get meta]&lt;br /&gt;
&lt;br /&gt;
As with all other nsv command, [[nsv_array]] is atomic and no explicit locking is required. This feature can be used to contruct a new nsv array by first filling up an ordinary temporary Tcl array via some time consuming process and then swapping it into place as above. While the new temporary array is being constructed, other threads can access the old array without delay or inconsistant data. You can even reset a complete nsv array in one step with &amp;quot;reset&amp;quot;. For example, instead of:&lt;br /&gt;
&lt;br /&gt;
    ns_share lock meta &lt;br /&gt;
    set lock [ns_mutex create]&lt;br /&gt;
&lt;br /&gt;
    ns_mutex lock $lock &lt;br /&gt;
    unset meta &lt;br /&gt;
    array set meta [array get tmpmeta]&lt;br /&gt;
    ns_mutex unlock $lock&lt;br /&gt;
&lt;br /&gt;
you can simply use:&lt;br /&gt;
&lt;br /&gt;
    nsv_array reset meta [array get tmpmeta]&lt;br /&gt;
&lt;br /&gt;
The reset option will flush and then reset all values atomically, eliminating the need for the explicit lock.&lt;br /&gt;
&lt;br /&gt;
Other options for the nsv_array command include:&lt;br /&gt;
* [[nsv_array]] exists ''array'' - test existance of array &lt;br /&gt;
* [[nsv_array]] size ''array'' - return # of elements in array &lt;br /&gt;
* [[nsv_array]] names ''array'' ''?pattern?'' - return keys of array&lt;br /&gt;
&lt;br /&gt;
'''Configuration'''&lt;br /&gt;
&lt;br /&gt;
The nsv system uses a common multithreading technique to reduce the potential for lock contention which is to split the locks to acheive finer grained locking. This technique groups arrays randomly into buckets and only the arrays within a particular bucket share a lock. The number of buckets to be used can be configured by setting the &amp;quot;nsvbuckets&amp;quot; tcl parameters, e.g.:&lt;br /&gt;
&lt;br /&gt;
    [[ns/server/server1/tcl]] &lt;br /&gt;
    nsvbuckets=20&lt;br /&gt;
&lt;br /&gt;
The default is 8 which should be reasonable. Note that you can monitor the lock contention, if any, by enabling mutex metering:&lt;br /&gt;
&lt;br /&gt;
    [[ns/threads]] &lt;br /&gt;
    mutexmetering=on&lt;br /&gt;
&lt;br /&gt;
and then viewing the results of &amp;quot;[[ns_info]] locks&amp;quot; command after the server has been running for some time. The nsv locks all have names of the form &amp;quot;nsv:##&amp;quot;. If you find many lock attempts which did not successed immediately, try increasing nsvbuckets.&lt;br /&gt;
&lt;br /&gt;
'''Migrating From ns_share'''&lt;br /&gt;
&lt;br /&gt;
Migrating from [[ns_share]] is straightforward. If your init.tcl included commands such as:&lt;br /&gt;
&lt;br /&gt;
    ns_share myshare &lt;br /&gt;
    set myshare(lock) [ns_mutex create]&lt;br /&gt;
&lt;br /&gt;
use instead:&lt;br /&gt;
&lt;br /&gt;
    nsv_set myshare lock [ns_mutex create]&lt;br /&gt;
&lt;br /&gt;
In your procedures, instead of:&lt;br /&gt;
&lt;br /&gt;
    proc myproc {} {&lt;br /&gt;
        ns_share myshare&lt;br /&gt;
        ns_mutex lock $myshare(lock)  ...&lt;br /&gt;
&lt;br /&gt;
use:&lt;br /&gt;
&lt;br /&gt;
    proc myproc {} { &lt;br /&gt;
        ns_mutex lock [nsv_get myshare lock]&lt;br /&gt;
        ...&lt;br /&gt;
&lt;br /&gt;
and within an ADP page, instead of:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;% &lt;br /&gt;
        ns_share myshare &lt;br /&gt;
        ns_puts $myshare(key1)&lt;br /&gt;
    %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;%=$myshare(key2)%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
use:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;% &lt;br /&gt;
        ns_puts [nsv_get myshare key1]&lt;br /&gt;
    %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;%=[nsv_get myshare key2]%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that, unlike [[ns_share]], no command is required to define the shared array. The first attempt at setting the variable through any means will automaticaly create the array. Also notice that only arrays are supported. However, to migrate from [[ns_share]] you can simply package up all existing [[ns_share]] scalars into a single array with a short name, perhaps just &amp;quot;.&amp;quot;. For example, if you had:&lt;br /&gt;
&lt;br /&gt;
    ns_share mylock myfile &lt;br /&gt;
    set myfile /tmp/some.file &lt;br /&gt;
    set mylock [ns_mutex create]&lt;br /&gt;
&lt;br /&gt;
you can use:&lt;br /&gt;
&lt;br /&gt;
    nsv_set . myfile /tmp/some.file &lt;br /&gt;
    nsv_set . mylock [ns_mutex create]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Category Documentation]] - [[Category Core Tcl API]]&lt;/div&gt;</summary>
		<author><name>Lemuelf</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Talk:Thread-shared_Variables&amp;diff=5315</id>
		<title>Talk:Thread-shared Variables</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Talk:Thread-shared_Variables&amp;diff=5315"/>
		<updated>2009-02-09T07:35:36Z</updated>

		<summary type="html">&lt;p&gt;Lemuelf: Network Shared or NaviServer?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Network Shared or NaviServer? ==&lt;br /&gt;
&lt;br /&gt;
Was it really referred to as &amp;quot;network shared variables&amp;quot;?  Or nsv stood for Naviserver Variables?  Nothing is shared in the network so I guess we shouldn't refer to it as &amp;quot;network shared variables&amp;quot; and so we avoid confusing people how nsvs work.  --[[User:Lemuelf|Lemuelf]] 02:35, 9 February 2009 (EST)&lt;/div&gt;</summary>
		<author><name>Lemuelf</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_parsequery&amp;diff=5184</id>
		<title>Ns parsequery</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_parsequery&amp;diff=5184"/>
		<updated>2009-01-28T08:30:07Z</updated>

		<summary type="html">&lt;p&gt;Lemuelf: fixed markup of sample code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Man page: http://aolserver.com/docs/tcl/ns_parsequery.html&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''NAME'''&lt;br /&gt;
&lt;br /&gt;
: ns_parsequery - Parse a URL query string into an ns_set.&lt;br /&gt;
&lt;br /&gt;
'''SYNOPSIS'''&lt;br /&gt;
&lt;br /&gt;
: '''ns_parsequery''' ''querystring''&lt;br /&gt;
&lt;br /&gt;
'''DESCRIPTION'''&lt;br /&gt;
&lt;br /&gt;
: This command parses the specified ''querystring'' into an [[ns_set]], which is returned.  The keys and values will be decoded.&lt;br /&gt;
&lt;br /&gt;
'''EXAMPLES'''&lt;br /&gt;
&lt;br /&gt;
    % set s [ns_parsequery &amp;quot;msg=Hello+World%21&amp;amp;a=b&amp;amp;a=b&amp;amp;c=d&amp;quot;]&lt;br /&gt;
    d0&lt;br /&gt;
&lt;br /&gt;
    % ns_set array $s&lt;br /&gt;
    msg {Hello World!} a b a b c d&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Category Documentation]] - [[Category Core Tcl API]]&lt;/div&gt;</summary>
		<author><name>Lemuelf</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=AOLserver_Wishlist&amp;diff=5165</id>
		<title>AOLserver Wishlist</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=AOLserver_Wishlist&amp;diff=5165"/>
		<updated>2008-09-17T08:00:56Z</updated>

		<summary type="html">&lt;p&gt;Lemuelf: unwikified proc code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''You might also want to post your wishes to the AOLserver projects Feature Request[http://sourceforge.net/tracker/?atid=353152&amp;amp;group_id=3152&amp;amp;func=browse] page at Source Forge.'''&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''Dossy, 2000-08-14:''' Let this page serve as a place for people to list features and enhancements they would like to see for AOLserver.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''2005-04-12:''' Idea for a simple aolserver installation maker - [[SAIM Proposal]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''2004-09-17:''' Please add an option to ns_quotehtml to write javascript (ECMAscript) output. Currently I use:&lt;br /&gt;
&lt;br /&gt;
    proc ns_quotejs {value} {&lt;br /&gt;
        for {set i 0} {$i &amp;lt; 256} {incr i} {&lt;br /&gt;
            if {$i &amp;lt; 32 || $i &amp;gt; 126 || $i == 34 || $i == 39} {&lt;br /&gt;
                set jsmap([format {%c} $i]) &amp;quot;\\x[format {%02x} $i]&amp;quot;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        set NS_QUOTEJS [array get jsmap]&lt;br /&gt;
        return [string map $NS_QUOTEJS $value]&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
Which takes about 20 times as long as ns_quotehtml. Perhaps the map from ns_urlencode could be reused.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''2003-06-02:''' Looking forward to full HTTP/1.1 compliance.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''2003-06-02:'''  Ultimatley it would be nice to factor out AOLserver functionality into standard Tcl packages which could then be scripted together to make the AOLserver.  Historicaly AOLserver functionality has found its way back into the Tcl core (all be it sporadically), and there is also now a fairly full feature Tcl Threads package.&lt;br /&gt;
&lt;br /&gt;
Low hanging fruit to get this started might be a Log module, the Ns_Set data structure.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''2003-06-02:'''  The [[ns_db]] interface is showing it's age.  It's high performance and built in pooling was great back in the day, but the [[ACS]] db_* interface is far superior, and if implemented natively could skip the costly [[ns_set]] structure.&lt;br /&gt;
&lt;br /&gt;
Might also be nice to link directly to the UnixODBC (see also: [[nsodbc]]) package as a back end to piggy back on all the work other people are doing on those drivers.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''Jerry, 2001-01-15:''' I'd like to see the startup tcls moved into a database, and I'd like to see a system that let one update those initial parameters at run time and have them take effect as soon as possible.  ([[maxthreads]], [[maxpost]], [[maxidle]], db pools, [[nsvhr]] hosts, nsvhr mapping, etc.)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''Ian, 2001-06-21:''' An easy way (perhaps with a new flavor of filter) to easily prepend and append output with header and footer html.&lt;br /&gt;
&lt;br /&gt;
And a new bike.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I'd like to see a webtrends-style reporting tool to quickly make pretty graphs and charts, thus keeping management gurgling happily in their offices.&lt;br /&gt;
&lt;br /&gt;
''It's not quite Webtrends, but you'' ''can't beat it for the price (free!): webalizer.''  ''And, it works with AOLserver's logfiles!  Check it out:'' http://www.webalizer.com/ -- [[Dossy]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''[[James Newton]], 2001-10-25:''' I'd like to see an HTML editor / publisher like AOLPress tightly integrated to AOLServer so that all the features of server could be easily incorporated in to the pages.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
It sure would be nice to have the capacity to control how [[nslog]] writes access.log... I would like to add in the optional virtualserver info at the beginning of the line so that I can easily parse that information out when using my log graph generator (webalizer, such a fun toy)...&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
&lt;br /&gt;
'''Kartic, 2003-03-17:''' How about a web-based configuration tool? Xitami Web server (not as widely used as Apache or AOLserver, free) has one such interface, built-in as a server extension and it is really cool. Such a facility in AOLserver will make life easier for newbies.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Standard authorization, authentication, identity, session, and cookie library and model, or at least a bare pluggable framework for authorization, or at the very least a real best practices framework using pre_auth filters or similar.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
phpinfo() style auto-formatted html output function (see http://us3.php.net/phpinfo) to display aolserver information. raw start at [http://caveman.org/info/] --[[User:Caveman|Caveman]] 09:07, 8 December 2005 (EST)&lt;/div&gt;</summary>
		<author><name>Lemuelf</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_config&amp;diff=5102</id>
		<title>Ns config</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_config&amp;diff=5102"/>
		<updated>2007-11-21T12:05:46Z</updated>

		<summary type="html">&lt;p&gt;Lemuelf: removed doubling of brackets in a tcl command in the example code so it doesn't appear as a wiki link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Man page: http://aolserver.com/docs/tcl/ns_config.html&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''NAME'''&lt;br /&gt;
&lt;br /&gt;
ns_config - Extract configuration information from the server&lt;br /&gt;
&lt;br /&gt;
'''SYNOPSIS'''&lt;br /&gt;
&lt;br /&gt;
'''ns_config''' ''?-exact | -bool | -int? section key ?default?''&lt;br /&gt;
&lt;br /&gt;
'''DESCRIPTION'''&lt;br /&gt;
 &lt;br /&gt;
This command returns the value associated with the ''key'' in the specified ''section'' of the current server's configuration.  If ''default'' is specified, and the ''section'' and ''key'' are not defined, then ''default'' is returned.  If ''default'' is not specified in this situation, an empty string is returned.&lt;br /&gt;
&lt;br /&gt;
If ''-exact'' is specified, matching on ''key'' is case-sensitive.  By default, matching is case-insensitive.&lt;br /&gt;
&lt;br /&gt;
If ''-bool'' is specified, '''ns_config''' will perform the conversion of a boolean value from &amp;quot;on&amp;quot;, &amp;quot;1&amp;quot;, &amp;quot;y&amp;quot;, &amp;quot;yes&amp;quot;, &amp;quot;t&amp;quot;, and &amp;quot;true&amp;quot; to &amp;quot;1&amp;quot;, and it will convert a boolean value of &amp;quot;off&amp;quot;, &amp;quot;0&amp;quot;, &amp;quot;n&amp;quot;, &amp;quot;no&amp;quot;, &amp;quot;f&amp;quot;, and &amp;quot;false&amp;quot; to &amp;quot;0&amp;quot;.  If a boolean contains any other value, a warning is written to the server log and an empty string is returned.  If the configuration value is not defined, an empty string is returned.&lt;br /&gt;
&lt;br /&gt;
If ''-int'' is specified, '''ns_config''' will return the integer value of the specified key.  If there is a non-integer value in the configuration, a warning is written to the log file and an empty string is returned. &lt;br /&gt;
&lt;br /&gt;
'''EXAMPLES'''&lt;br /&gt;
&lt;br /&gt;
  % ns_config ns/parameters debug&lt;br /&gt;
  off&lt;br /&gt;
&lt;br /&gt;
  % string length [ns_config dummy dummy]&lt;br /&gt;
  0&lt;br /&gt;
&lt;br /&gt;
  % ns_config dummy dummy default&lt;br /&gt;
  default&lt;br /&gt;
&lt;br /&gt;
'''SEE ALSO'''&lt;br /&gt;
&lt;br /&gt;
[[ns_configsection]], [[ns_configsections]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Category Documentation]] - [[Category Core Tcl API]]&lt;/div&gt;</summary>
		<author><name>Lemuelf</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_findset&amp;diff=5064</id>
		<title>Ns findset</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_findset&amp;diff=5064"/>
		<updated>2007-05-24T13:30:53Z</updated>

		<summary type="html">&lt;p&gt;Lemuelf: removed double bracket so it will show up as a bracketed tcl command and not as a wiki link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Man page: http://aolserver.com/docs/tcl/ns_findset.html&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''NAME'''&lt;br /&gt;
&lt;br /&gt;
: ns_findset - Find a set by its name from a list of sets&lt;br /&gt;
&lt;br /&gt;
'''SYNOPSIS'''&lt;br /&gt;
&lt;br /&gt;
: '''ns_findset''' ''sets name''&lt;br /&gt;
&lt;br /&gt;
'''DESCRIPTION'''&lt;br /&gt;
&lt;br /&gt;
: This command is used to find a set by its ''name'' from a list of ''sets'' and returns the setId of the first set whose name matches ''name'', or returns an empty string if no set matches.&lt;br /&gt;
&lt;br /&gt;
'''EXAMPLES'''&lt;br /&gt;
&lt;br /&gt;
    % set sets [list]&lt;br /&gt;
&lt;br /&gt;
    % lappend sets [ns_set create foo]&lt;br /&gt;
    d0&lt;br /&gt;
&lt;br /&gt;
    % lappend sets [ns_set create bar]&lt;br /&gt;
    d0 d1&lt;br /&gt;
&lt;br /&gt;
    % lappend sets [ns_set create baz]&lt;br /&gt;
    d0 d1 d2&lt;br /&gt;
&lt;br /&gt;
    % ns_findset $sets bar&lt;br /&gt;
    d1&lt;br /&gt;
&lt;br /&gt;
    % llength [ns_findset $sets quux]&lt;br /&gt;
    0&lt;br /&gt;
&lt;br /&gt;
    % ns_set cleanup&lt;br /&gt;
&lt;br /&gt;
'''SEE ALSO'''&lt;br /&gt;
&lt;br /&gt;
: [[ns_set]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Category Documentation]] - [[Category Core Tcl API]]&lt;/div&gt;</summary>
		<author><name>Lemuelf</name></author>
		
	</entry>
</feed>