2000-10-20  Kriston J. Rehberg  <Kriston@AOL.NET>

	*** AOLserver 3.2 RELEASED ***

2000-10-20  Jim Davidson

	* win/tclWinSock.c: Fixed deadlock in sockets init code.

	* nsd/nswin32.c: Fixed service install code to allow long
	pathnames with spaces.
	Added/use ns_pipe which set's close-on-exec like ns_sockpair.
	

2000-10-17  Kriston J. Rehberg  <Kriston@AOL.NET>

	* nssock/sock.cpp: extra padding on Server Busy message to defeat
	MSIE friendly error messages.

	* nsd/nsconf.h: All configuration option defaults have been moved
	to nsconf.h as #defines.

	* Makefile (install): Tcl library for nsd8x is now installed into
	$(PREFIX)/lib/tcl8.3.

	* tcl/http.tcl (ns_httpopen): Host:port is now sent to remote host
	if != 80.  Suggested by Jerry Asher.

	* tcl/fastpath.tcl (_ns_dirlist): All kinds of Win32 pathnames
	should now be working.  Thanks to Eric Klein.

	* nsd/return.c (Ns_ConnReturnNotice): New options "errorminsize",
	to pad error messages to defeat MSIE friendly errors (fix
	suggested by ArsDigita) and "noticedetail" to return more detailed
	information on notice pages.

	* nslog/nslog.c: suppressquery option added to suppress logging of
	query data.

	* nslog/nslog.c: LogExtendedHEaders option added.  Contributed by
	ArsDigita.


	* nsd/tclfile.c: Input string to mktemp is copied, because mktemp
	edits the string in-place and that's generally a bad thing to do
	with argv's.  Contributed by ArsDigita.

	* nsd/tclnsshare.cpp (ShareTraceProc): Patch to tclnsshare.cpp to
	avoid race conditions if the shared value is a list.  Contributed
	by ArsDigita.

	* tcl/http.tcl (ns_httpopen): CRLF now returned in ns_httpopen.
	Contributed by ArsDigita.

	* tcl8.3.2/generic/tclCmdIL.c: Nonsense case of lsorting a list
	with length <= 0 caused a memory leak.  Fixed.  Contributed by
	ArsDigita.
	
	* nsd/adpfancy.c: We now use the Arsdigita version of adpfancy.
	Contributed by ArsDigita.
	
	* nsd/adp.c: Sundry ArsDigita changes.

2000-10-16  Kriston J. Rehberg  <Kriston@AOL.NET>

	* tcl/init.tcl:  Initialize errorCode and errorInfo like tclsh
	does.  From ArsDigita.

	* nsd/nsd.h, nsd/tclcmds.c, nsd/tclvar.c: nsv_names Tcl command
	lists names of nsv's in memory.

	* tcl8.3.2: The complete Tcl 8.x distributions are now included.
	They aren't installed with AOLserver's "gmake install", but you
	can install them manually if you want to use them for the i18n
	encodings and stuff like that.  It will install into the
	"lib/tcl8.3" directory of the binary distribution with AOLserver
	3.3 and later.

	* nsd/nsmain.c (Ns_Main): Had to move Ns_ThreadSetName below the
	stdin/stdout/stderr reassignment to fix a fd problem with running
	nsd on Irix in "installed" or "daemon" mode that would prevent the
	server from starting up.  Sigh.
	(Ns_Main): Took out little note about -k|-K being deprecated.

2000-10-13  Kriston J. Rehberg  <Kriston@AOL.NET>

	* nsd/nsmain.c (Ns_Main): gid of the specified user is set even if
	it's not specified.
	(UsageError): -K and -k give a "deprecated" warning.
	(Ns_Main): -f gives a "deprecated" warning.

	* nsd/binder.c (PreBind): Didn't really tell us if it was
	successful at pre-binding.  Helpful to know if you're wondering
	what happened to that port you wanted to pre-bind.
	(Binder): backlog variables (2) initialized to nsconf.backlog.

	* nssock/sock.cpp, nsd/return.c: Made an attempt at standardizing
	the error codes and error page content.
	
2000-10-13  Jim Davidson
	
	* sproc.cpp: Fixed Wakeup() error message and update child's
	sproc pid after fork.

	* nsd/random.c: Put back log message when generating seeds.

	* nsd/nsconf.c: Fixed memory overwrite bug in stats and increased
	the default buffer value.

	* nsd/keepalive.c: Fixed array overwrite with maxkeep=0 bug.
	Contributed by ArsDigita.
	
	* nsd/tclkeylist.c: A more modern version added that's compatible
	with Tcl 8.3.2 (nsd8x).

	* nsd/stamp.c: Forces the build date reported by AOLserver to be
	absolutely the last possible moment before the link step happens,
	not just the last time nsmain.c was built.

	* nsd/binder.c: New option "-b" to prebind ports as root (but not
	listen on them).  This allows AOLserver to start up on MacOS X on
	ports 80 and 443 like this:  "nsd ..blah.. -b 10.0.0.1:80".

	* nssock/: Building nsssl is much less of a debacle and doesn't
	rebuild itself three times anymore.

	* various: fork() calls in all kinds of code were changed to use
	ns_fork.  ns_fork now lives in the thread library (thread/
	directory).

	* tcl8.3.2/generic/tclIO.c: Fixed memory leak that leaks around
	112 bytes each time a file descriptor is closed.  Thanks to Rob
	Mayoff for finding this and proposing a solution.

2000-10-09  Kriston J. Rehberg  <Kriston@AOL.NET>

	* sample-config.tcl: nsd.tcl is now sample-config.tcl so that
	existing users can look at the new reference configuration.

	* nsd/nsmain.c (Ns_InfoNameOfExecutable): new function just
	returns nsconf.nsd which is determined elsewhere.

	* nscp/nscp.c (Login): Tells you lots of harmless info about the
	machine once you log in.  Also, nscp does not run unless
	configuration is explicitly set

	* nsd/nsmain.c: Some typo or other.

	* General: Files were re-arranged and some were renamed.  The
	sample SSL key/cert files are sample-certfile, sample-keyfile.
	The nsd.tcl is now called sample-config.tcl (so that existing
	installations always have a current reference copy of the
	configuration).  Other minor changes.

	* tests/:  Moved from its hiding place in scripts/test.  Install
	them with "gmake install-tests".

	* nsd/tclxkeylist.c, nsd/tclcmds.c, nsd/Makefile: Re-added TclX
	keyl* commands that were in AOLserver 2.x.  These are inferior to
	ns_set which is why they were left out in the first place.

2000-10-04  Jim Davidson

	* binder.c: Set close-on-exec on received fd from binder.
	
	* sock.c: Removed cthread errno API's, Mac OS X now has
	thread-safe errno.

	* nsd/nsmain.c, include/Makefile.global, nsd/nsthread.h,
	nspd/main.c, nsunix/nsunix.c, nsvhr/nsvhr.c, thread/Makefile,
	thread/osthread, thread/reentrant.c, thread/signal.c: Updates for
	Mac OS X.  Use MACOSX instead of APPLE; use HAVE_BSDSETPGRP,
	HAVE_CMMSG, use pthreads instead of cthreads.
	
	* nssock/sock.c: Removed setting bufsize to uninitialized value on
	ssl.

	* include/ns.h: Removed Ns_CacheTimedGetValue which was an odd
	interface not used anywhere.
	
	* nsd/nsd.h: Update to version 3.11.
	
	* tcl/namespace.tcl: Added namespace export to init script.
	
	* thread/pthread.cpp: Stopped using pthread_once as it appears to
	require a lock.
	
2000-10-04  Kriston J. Rehberg  <Kriston@AOL.NET>

	* win32/nsssl/nsssl.dsp: nsssl project for win32.

	* win32/aolserver.dsw: main installation keeps DLL's as DLL's now.

	* scripts/nsd.tcl: shared library extension is now
	platform-dependent

	* nssock/ssltcl.c: Changed name of ReadFile adn WriteFile to avoid
	Win32 naming conflicts.
	
2000-09-28  Kriston J. Rehberg  <Kriston@AOL.NET>

	* scripts/tests/nstelemetry.adp: added "Expires: now" header to
	ensure it gets run each time it's visitted.

	* nsd/serv.c (NsConnArgProc): Race condition when threads exit
	while [ns_info threads] is run; arg can be NULL.  Seen mostly by
	people who regularly visit nstelemetry.adp.
	(AppendConn): same thing but with connPtr.  This may be a losing
	battle.  It appears to work on a busy Irix server, so I'm
	declaring victory for now.

2000-09-28  Jim Davidson
	
	* nssock/sock.c: Fixed bufferred read code in SockRead, resulting
	in a big performance boost and system load reduction.  Special
	thanks to Zachary Girouard <zakk@aol.net>.

2000-09-05  Kriston J. Rehberg  <Kriston@AOL.NET>

	*** AOLserver 3.1 Released *** 

2000-09-05  (various: Jerry Asher, Jim Davidson, "Dossy," Curtis Galloway,
	Scott S. Goodwin, Rob Mayoff, Kriston J. Rehberg)

	* thread/win32.cpp: Sets thread stack size as on other platforms.

	* thread/thread.c: NULL out thread arg at exit to avoid
	Ns_ThreadEnum checking arg info for possibly deallocated context
	as seen in ns_info threads.  Also, moved read of firstPtr in
	Ns_ThreadEnum inside lock.  Added Ns_ThreadCreate2 in thread.c
	needed for upgrade to Tcl 8.3.1 in tcl8x.c
	
	* thread/pthread.cpp: ETIME bug work around not causes wakeup in
	Ns_CondWait and Ns_CondTimeWait instead of waiting again.  This is
	more conservative and should avoid problems some have had with
	threads missing wakeup.

	* thread/pool.c: Added a simple 1-byte range check to -z
	allocator.

	* thread/Makefile: Added dependency for osthread.o to Makefile.

	* tcl/namespace.tcl: Added namespace export to init script.

	* nsvhr/nsvhr.c: Switched to Ns_WriteConn in TimedSockDump to
	ensure all data was sent.

	* nssock(nsssl): SSL module includes a fake 40-bit/512-bit
	export-grade SSL keyfile.pem and certfile.pem for immediate use on
	installation.  Adjusted for use with BSAFE 4 and 5.

	* nspd: Library now installed to binary distribution.

	* nsd/tclsock.c: Fixed crash bug in error message in ns_socknread.

	* nsd/tclcmds.c: Added ns_adp_registertag command as documented.
	
	* nsd/serv.c: Added missing break for unauthorized case in
	ConnRun.

	* nsd/random.c: Fixed deadlock between Ns_DRand/Ns_GenSeeds.
	
	* nsd/nsmain.c: Fixed some message formatting problems.

	* nsd/mimetypes.c: Added .png type, "image/png".
	
	* nsd/dbtcl.c: Removed unused variables in GetCsvCmd.  Use a
	dstring to create the column list instead of incrementally setting
	the output variable with Tcl_SetVar.  This was necessary to avoid
	conflicting definitions of the needed TCL_ flags between 7.6 and
	8.x.

	* nsd/dbinit.c: MOdified current per-thread handle count to use a
	single TLS slot instead of a slot per pool.
	
	* nsd/tclinit.c,adp.c,conn.c: The use of thread-local storage
	(Tls) is now self-initializing in the conn, ADP, Tcl, etc.  This
	allows ns_conn commands to be used outside a connection thread as
	well as other uses of Tls where it may not be ready for use.

	* nscp/nscp.c: Password non-echo code confuses Win32 and some free
	Unix telnet clients so it has been disabled by default for now,
	though it can be enabled by setting "echopassword" in the nscp
	module section of nsd.tcl.
	
2000-08-21  Kriston J. Rehberg  <Kriston@AOL.NET>

	* nscp/nscp.c: Makes some attempt to recognize and handle telnet
	IAC codes like CTRL-C and CTRL-D to force a logout.  This
	implementation of the telnet protocol is dirt-cheap, so only
	standard Unix telnet is supported.  On Win32, IAC handling is
	completely disabled because the client is too chatty with its IAC
	codes.

2000-08-20  Kriston J. Rehberg  <Kriston@AOL.NET>

	* nsftp, nspostgres, nssolid, nssybpd moved to $TOP level.

2000-08-17  Jim Davidson

	* nsd/dbtcl: Removed unused variables in GetCsvCmd.
	
	* nsd/adp.c: Fixed bug of not truncating output buffer when an
	error was thrown during an ns_adp_parse.  Fix suggested by Rob
	Mayoff.

	* tcl7.6 and tcl8.2.3: Switched to blocking Tcl_WaitPid to avoid
	zombies as suggested by Rob Mayoff.
	
	* thread: NULL out thread arg at exit to avoid Ns_ThreadEnum
	checking arg info for possibly deallocated context as seen in
	ns_info threads.  Also, moved read of firstPtr in Ns_ThreadEnum
	inside lock.
	
2000-08-17  Kriston J. Rehberg  <Kriston@AOL.NET>
	
	* nssock/sock.c (SockThread): warning sent to log when Server Busy
	is returned.

	* All the Makefiles should be in line with each other.  Typing
	"gmake", "gmake install" and "gmake clean" should work in any
	directory.  NSHOME is paid attention to by all Makefiles.

	* nsd: Ns_Log and Ns_Fatal statements are hopefully more
	standardized and more useful to admins and developers.

	* Irix now builds as -o32 using the native compiler by default.
	See Makefile.global on how to change.

2000-08-15  Kriston J. Rehberg  <Kriston@AOL.NET>

	* include/Makefile.global (INSTLOG): should have pointed to
	$(INST)/lib, not $(INST)/modules/lib.

	* Makefile: nsunix resurrected.  All modules are built.  If a
	module is missing a library, it is not built, but it won't stop
	the AOLserver build process (no error is thrown).  The build will
	continue with the next module.
	
	* nsftp: guesses if you have TCP_WRAPPERS available.

	* nsext: Ten guesses why $(NSHOME)/include/nsextmsg.h was
	duplicated here.

	* nssybpd: Hopefully, the log statements will be easier to
	understand by both admins and developers.  It's still messy since
	it uses syslog.  Makefile redone to use standard AOLserver rules.
	RPATH is used a little more intelligently.  Removed files that had
	no business living there.
	
	* include/Makefile.global: Took stab at RPATH support on Solaris
	to perhaps remove the need for LD_LIBRARY_PATH on an
	intelligenly-administered system.  New rule for libnspd.a.
	
	
2000-08-14  Kriston J. Rehberg  <Kriston@AOL.NET>

	* Makefile: nsvhr has been resurrected and enjoys our full
	support.

	* nsexample/Makefile: The include at the bottom wasn't using
	$(NSHOME).

2000-08-14  Jim Davidson

	* Tcl 8.x library upgraded to tcl8.3.2.

	* thread/pool.c: A spiffy range-checker added to the Zippy (-z)
	memory allocator.

2000-08-11  Kriston J. Rehberg  <Kriston@AOL.NET>

	* nsvhr/nsvhr.c: Always add "Connection: close" to the request
	line to satisfy HTTP 1.1 RFC -- this would break MSIE in HTTP 1.1
	mode.  HTTP_EOL of "\r\n" used on all request lines for stupid web
	servers on the other end.  Protocol "tcp" added as synonym of
	"http" for old-time Unix heads.  Lots of folks lended a hand on
	this one -- Satyam Priyadarshy, Jerry Asher, Kriston Rehberg, and
	special thanks to Wanda G. at AOL for adding a CNAME in DNS so
	quickly.

2000-08-09  Kriston J. Rehberg  <Kriston@AOL.NET>

	* nsd/serv.c: A whole lot less chatty about conns starting and
	exiting.  If you want to see them, turn on the Debug flag.

	* doc/*: lots of updates.  Title page extremely simplified.  SSL
	docs updated.  Release notes updated.  NSV docs corrected (thanks
	to Todd Levy <dcitodd@aol.com>).

2000-08-09  Jim Davidson <jgdavidson@aol.com>
	
	* tcl7.6/generic/tclFHandle.c: Removed needed fileTable which
	could result in crashes when fd's where reused quickly [fixes a
	rare multiple-exec crashing bug in nsd76 --kris].

	* thread/tcl8x.c: Added a wrapper startup for Tcl_CreateThread for
	the benefit of Win32.

	* nsd/log.c: Removed severityRank array.

	* nsd/tclmisc.c: Fixed bug with ns_info pid. [I can't code --kris]
	
	* nsd: keepalive.c,nsmain.c,sched.c,serv.c: Re-ordered shutdowns
	to ensure connection threads are stopped before other shutdowns
	begin (e.g., sched, sockcallback).
	
	* tcl8.3.1 replaces tcl8.3.0.  README.AOLSERVER added to tcl8.3.1
	directory.  Original copies of changed are named *.orig.

	* include/Makefile.global: Build environment now uses gcc -shared
	-nostartfiles as the default LDSO.

	* nsthread/thread.c: Added Ns_ThreadCreate2 with extra flags
	argument used by Tcl_CreateThread to create a detached thread.
	
2000-08-06  Scott S. Goodwin  <scott@scottg.net>

	* nsd/log.c: Segmentation fault was occuring when writing to the
	log file because file pointer was being assigned to incorrectly -
	it wasn't NULL and it wasn't a valid address within processes
	memory. Fixed.

2000-08-06  Scott S. Goodwin  <scott@scottg.net>

	* nssock: You can now compile with BSAFE versions 4 and 5. You'll
	need to specify the path to your BSAFE libaries and the BSAFE
	version in the nssock/Makefile before compiling. If you don't have
	BSAFE and want to compile without SSL at all, edit the toplevel
	Makefile and take out all the "SSL=1" text. The files changed were
	nssock/Makefile and nssock/t_stdlib.c.

2000-08-02  Kriston J. Rehberg  <Kriston@AOL.NET>

	* Build process is a little more rule-oriented.  The cleaning
	rules "distclean" and "clobber" were removed.  The Tcl libraries
	are always distcleaned when "gmake clean" is invoked.  Rules that
	can be used as dependencies were made for libnsthread and the Tcl
	libraries -- their names are "libnsthread," "libtcl76," and
	"libtcl8x," respectively.  PREFIX is now used as the installation
	directory (along with INST), so the more familiar "gmake install
	PREFIX=/usr/local/aolserver" will work.  Additionally, gmaking in
	a subdirectory with dependencies now works.
	
	* nsd/log.c: The sourge of modlog has been removed.  All code
	included with AOLserver that used Ns_ModLog now doesn't.  Many log
	statements are now hopefully more standardized.  This will be a
	continuing improvement over the next several updates.  I would
	like to use gcc's __FUNCTION__ macro but it doesn't work on native
	compilers, but we may start using __LINE__ and __FILE__ instead or
	replace Ns_Log with a smart macro that takes care of all this
	stuff for us.

	* nsd/tclmisc.c (NsTclInfoCmd): ns_info pid added to return the
	process id.

2000-08-01  Kriston J. Rehberg  <Kriston@AOL.NET>

	* nsd/adp.c (Ns_AdpRequest): The enableexpire option was putting
	an Expires header even if it already existed.

	* nsd/return.c (Ns_ConnReturnNotice): Yikes, /face should have
	been /font.  No more fonts, colors, etc, on default notice pages.

	* nsd/tclsock.c (NsTclSockOpenCmd): Removed spurious Ns_Log Notice
	from ns_sockopen.

	* tcl/form.tcl (ns_getform): MSIE presents the wrong stuff to the
	server when a multipart/formdata POST is redirected.  Workaround
	contributed by Joseph Bank.

	* tcl/fastpath.tcl (_ns_dirlist): base href removed -- links are
	now fully-qualified.

	* Makefile (install): include and lib dirs are now included in
	binary distribution.

	* tcl/http.tcl (_ns_http_gets): \n replaced by \r in all but
	_ns_http_gets so that arbitrary headers get set correctly.
	Contributed by <jsc@arsdigita.com>.

	* tcl7.6/generic/tclPosixStr.c (Tcl_SignalMsg): Patch to Tcl 7.6
	for Red Hat on SPARC architectures.  Contributed by Mike Chan
	<snotty@linux.com>

2000-07-13  Kriston J. Rehberg  <Kriston@AOL.NET>

	* scripts/nsd.tcl: nssslmodule names the nsssl/nsssle binary's
	filename.  nscp_port tells nscp what port to listen.

	* nssock: nssock.c renamed sock.c, SSL support has been merged
	back with nssock so that both nsssl and nssock use identical
	socket code.
	
	* nsssl2: directory removed; nsssl is in the nssock directory now.

2000-05-09  Kriston J. Rehberg  <Kriston@AOL.COM>

	* Re-added doc directory which has had the online docs removed.

2000-05-02  Kriston J. Rehberg  <Kriston@AOL.COM>

	* Makefile, include/Makefile.global, include/Makefile.module,
	nsexample/Makefile: Now uses NSHOME variable to locate AOLserver.
	NSHOME is automatically figured out in the top-level Makefile and
	all the lower Makefiles still use relative directory paths.  The
	intention of NSHOME is for modules that do NOT live in the
	AOLserver source directory tree.  The nsexample/Makefile explains
	how this works.

	* nsftp module added.  Contributed by Eric O'Laughlen
	<erico@aol.net>.

2000-04-12  Kriston J. Rehberg  <Kriston@AOL.COM>

	*** AOLserver 3.0 FINAL Released ***
	
2000-04-12  Kriston J. Rehberg  <Kriston@AOL.COM>

	* tcl8.3.0/win/tclWinSock.c: In Win32 only, Tcl 8.3.0 deadlocked
	when opening a socket.  This affected anything that used
	ns_sockopen, e.g. ns_sendmail.  Many thanks to Curtis Galloway
	<curtisg@arsdigita.com> for finding and fixing this bug which
	should also find its way into the Tcl distribution.

	* scripts/nsd.tcl: Now effects a new out-of-box experience.
	Automatically figures out the home directory of AOLserver.
	Figures out whether to load nscp based on whether a valid user and
	password exist.  Only loads nsssl if cert/key files are present,
	respectively.  The only thing that needs manual intervention now
	is nsperm.  You can also start AOLserver from anywhere on your
	system now -- not just from its home directory.
	
	* nsd/nsmain.c, nsd/tclstubs.cpp, nsd/tclmisc.c, nsd/nsd.h:
	Locates the executable using NsTclFindExecutable on Tcl 7.6 and
	8.x.  Tcl commands [ns_info argv0] and [ns_info nsd] added.
	
	* nsssl2/Makefile: The nsssl module's pathnames were getting lost.
	It now installs into servers/server1/modules/nsssl directory
	instead of nsssl2.

2000-04-11  Pete Jansson <petej@clickvision.com>

	* nssybpd/Makefile,nssybpd.c: Corrected to build on Linux.

	* nsext/nsext.c (DbProxyTimedIO,DbProxyGetString): Fixed latent
	bug in DbProxyTimedIO which impaired performance; changed
	DbProxyGetString back to using DbProxyTimedIO.  If Shai Bentov
	<shai@netscape.com> hadn't found the previous change, I don't
	know how I would have figured this one out.  Also pass empty
	strings to database proxy if parameters are not specified.

2000-04-10  Kriston J. Rehberg  <Kriston@AOL.COM>

	* nsext/nsext.c (DbProxyGetString): Uses its own version of
	DbProxyTimedIO that grants a nearly 8x performance increase to
	external database drivers.  Many thanks to Shai Bentov
	<shai@netscape.com>.

2000-04-07  Kriston J. Rehberg  <Kriston@AOL.COM>

	*** AOLserver 3.0rc2 Released ***
	
2000-04-07  Kriston J. Rehberg  <Kriston@AOL.COM>

	* nssolid/nssolid.c,Makefile: changed name to nssolid.c and
	removed solid.h.  At the same time, I can't find the SOLID
	database product this uses anywhere at http://www.solidtech.com/.

2000-04-06  Kriston J. Rehberg  <Kriston@AOL.COM>

	* nsext/nsext.c (AllDigits): casted argument to unsigned char per
	"isdigit" man page.

	* nsd/nsmain.c (Ns_Main): Ns_Log's parameters weren't initialized
	before they were used by Ns_Log at server startup resulting in
	incorrect behavior.

	* nsd/tclmisc.c (NsTclInfoCmd): added [ns_info address] command.

	* nsd/nsmain.c (Ns_InfoAddress): new command [ns_info address] to
	return primary IP address of the machine running AOLserver.

2000-04-05  Kriston J. Rehberg  <Kriston@AOL.COM>

	* Makefile (all): "make clobber" lets you clean out everything
	without destroying the CVS directories.

	* thread/pthread.cpp (Ns_CondWait): Solaris ETIME bug workaround.
	Solaris may inappropriately return ETIME to pthread_cond_wait.
	(Ns_CondTimedWait): same problem

2000-04-03  Kriston J. Rehberg  <Kriston@AOL.COM>

	* scripts/tests/adp/: More confidence tests added.

	* main.c, tclPosixStr.c: Now work on Alpha and Sparc Linux.  We
	plan to get rid of these architecture-but-not-operating-system
	dependencies soon.  Thanks to Brent Fulgham <bfulgham@debian.org>.

	* tclstubs.cpp, adp.c: ADP_RETURN no longer unrolls all the
	callers in both Tcl 8.x and Tcl 7.6.  Special thanks to Bob Terek
	for the report and the Tcl 8.x solution <rterek@worldpages.com>.

	* nsd/tclmisc.c: removed "interp" from the list of commands
	supported by ns_info.  Thanks to Jerry Asher <asher@autobahn.org>.

	* tcl/file.tcl: new parameter ErrorPage in
	ns/server/servername/tcl allows a custom Tcl error pages to be
	sourced.  It requires a full pathname and is sourced in the same
	frame as the calling function, so you can use errorCode to find
	out what happened.

	* nsext.c: sets CloseOnExec on database internal driver to avoid
	stuck-open connections on child freeze.  The nspd seems to already
	do this in its own way for external drivers.

	* ChangeLog: Started using Emacs ChangeLog file format and moved
	it to the top-level directory.

	* nssybpd: A completely rewritten Sybase database proxy daemon is
	in the nssybpd directory.  You'll need the Sybase Client Libraries
	fromhttp://www.sybase.com/ which you can obtain via a free
	promotion for x86 Linux.  Contributed by Pete Jansson
	<petej@clickvision.com>. 
	
	* nspostgres: The Postgres driver and its changes have now been
	merged with the ACS/pg version.  There should no longer be a need
	for a separate Postgres driver version.  The new nspostgres driver
	now has support for the old ExtendedTableInfo
	(ns_columns/ns_tables) from AOLserver 2.x, has clever BLOB
	emulation for non-BLOBBy databases like Postgres, and works well
	with ACS/pg.  Contributed by Don Baccus <dhogaza@pacifier.com>,
	Lamar Owen <lamar.owen@wgcr.org>, Ben Adida <ben@mit.edu>, and Jan
	Wieck <wieck@debis.com>.  Many thanks go out to all involved!

	* conn.c: The normal Ns_ConnLocation can be replaced with your own
	location generator with Ns_SetConnLocationProc.  In tandem with a
	custom url2file function, this works extremely handily as a fast,
	efficient virtual hosting mechanism without using nsvhr.
	Contributed by Jay Ridgeway <jamesridge@aol.com>.

	* nsd/tclstats.c: statmaxbuf/statlevel should be working again.

	* tcl/fastpath.tcl: The _ns_dirlist directory-listing function now
	sorts the directory.

	* tcl/fastpath.tcl: The _ns_dirlist function no longer aborts when
	encountering a symlink to a pathname that does not exist.
	Instead, the "simple" version just prints the filename with a
	link.  The "fancy" version displays the filename but lists "N/A"
	for both Time and Data. Clicking on the filename, which is still
	active, would return a "404 - Not Found" so that webmasters and
	visitors can figure out what is going wrong.

	* scripts/nsd.tcl: The standard ADP parser is now the default.
	It's faster and more robust than the "fancy" parser.  You can
	still use the "fancy" parser if you prefer, but it cannot handle a
	construct like "<% ... %>" and some of the more useful features of
	the fancy parser are limited (eg, ADP tags cannot be created after
	server startup).
	
	* nsd/: nsd now increases max open files *before* threads
	initialization. Ns_Main now returns the exit code to main to
	satisfy Win32.

	* nsd/return.c: The "Connection:" header is only inserted if not
	already present (needed for applications that want to set their
	own "Connection:" headers, like "Connection: keep-alive" or
	"Connection: close").

	* doc/: The doc/ has been re-arranged somewhat; HTML "guides" are
	in their respective directories while stand-alone text files have
	been moved back up to doc/.

	* nsd/keepalive.c: A rare race condition in the HTTP keepalive
	code during server shutdown has been fixed.

	* (various): The database driver now checks if a datasource is
	null before attempting to use it.

	* nsd/urlencode.c: now works with character sets other than lower
	US-ASCII and the accented characters in ISO-8859-1.  This was
	breaking some internationalized applications on certain platforms.

	* scripts/nsd.tcl: nsperm and nscp are disabled in the sample
	nsd.tcl for security reasons.  It should be made clear that the
	default passwords and/or permissions are well-known and should be
	changed by the administrator before using nsperm or nscp.

	* nsd/tclsock.c: ns_sockopen -nonblock was blocking anyway.

	* win32/: There have been major enhancements to Win32 support; see
	win32/ for the skinny.

	* odbc/: The Win32 ODBC driver has returned to provide access to
	ODBC databases.  See the nsodbc/ directory at the top level and
	win32/nsodbc for the MSVC project file.  You can also use this to
	connect to ODBC databases from Unix.

	* nscgi/: nscgi has been rewritten and has the added benefit of
	working well in Win32.

	* nsperm/: nslog rolls its logs properly in Win32 now.

	* nsd, Makefile: Reminder: "nsd82" is now called "nsd8x."  "nsd76"
	will remain as "nsd76."  The installer will delete nsd82 from your
	$INST/bin directory to help you out.

	* tcl7.6, tcl8.3.0: Extraneous, unused code from the Tcl
	distributions have been removed from the source directories,
	greatly decreasing the distribution size by several megabytes.

	* all: Even more amenable to the future Autoconf transition.
	We're getting there!

	* include/Makefile.module: Makefile.module and other specialty
	Makefiles properly handle a module's custom list of libraries
	(MODLIBS) and override the LIBS variable.

	* include/Makefile.global: LDSO does not take LDFLAGS anymore.
	LDSO is for making dynamic libraries and has special options of
	its own.  This is important because some things can't work if
	shared object creation flags are there (ie, libnsthread.a,
	libnspd.a).  Furthermore, some platforms set LDSO to the C
	compiler called with special flags.
	
	* include/Makefile.global: Irix has some new build variables that
	allow the use of gcc for both tcl7.6 and tcl8.3.0.  It now forces
	the linker to use n32 exclusively.  This was another annoying Irix
	roadblock that had prevented use of gcc on Irix for tcl8.3.0 in
	previous releases of AOLserver 3.  This doesn't fully work for the
	native compiler, however.  This only affects those very few people
	still using Irix.

	* nsvhr/, nsunix/: The nsvhr and nsunix modules are now built
	optionally; see the top-level Makefile.

	* scripts/nsd.tcl: The sample nsd.tcl is much clearer.  Some notes
	about the nsthread "stacksize" parameter has been added.  Some
	modules have been commented-out for security reasons.  Clearer
	documentation has been added.


----------------------------------------------
What's New in AOLserver 3 Release Candidate #1
----------------------------------------------

	* New build process is hopefully more self-contained and
	straightforward.  The global Makefile is located in
	include/Makefile.global.  The Makefile used for making modules is
	located in include/Makefile.module.

	* Threading model that is built is based on the -DUSE_threadmodel
	variable.  This is determined by platform but defaults to pthreads
	on all but a few platforms like Irix and OS/X.

	* Dependencies for targets are checked.  You can invoke "gmake"
	from any directory in which a target is found.

	* The building, installation and cleaning processes now happens in
	the Makefiles for each target (modules, server main, thread
	library, tcl).
	
	* You can optionally build the Tcl 7.6 or Tcl 8.x versions of nsd,
	or both.

	* The Makefile for "nsd" is a lot smarter on which Tcl libraries
	to use and which Tcl-specific code needs to be re-built between
	Tcl versions.  This special trick is now handled by the tclstubs
	and *.cpp files in the nsd directory.

	* AOLserver is moving slightly closer towards using Autoconf and
	forsaking GNU Make.

	* SSL v2 is supported by the nsssl2 module for serving pages and
	generating keys and certificate requests.  BSAFE 3 libraries are
	required to build this module.

	* The next-generation "nsperm" permissions module has returned.

	* Documentation is now located in the doc/ directory.  Manual
	pages have been removed.  This documentation will become the basis
	for http://aolserver.com/doc/.

	* Comprehensive documentation on nsd.tcl configuration options is
	available in doc/admin/config.txt.

	* The nspostgres database driver has been brought up-to-date and
	moved up to the "nspostgres" directory.  These latest changes were
	contributed by Jan Wieck <wieck@debis.com>.

	* The "examples/" directory has been removed.  There is a simple
	example in the nsexample/ directory and more examples can be found
	in the documentation and the source code to simple modules like
	"nscgi."

	* Confidence tests are now in scripts/tests/.  We always
	appreciate additions to this collection.

	* OpenBSD is now supported.  Contributed by Michael Yoon
	<michael@yoon.org>.

	* "ns_conn connected" Tcl command has returned.  Contributed by
	Mark Dalrymple <markd@arsdigita.com>.

	* The EnableTclPages parameter for serving "*.tcl" pages has
	returned thanks to Rob Mayoff <mayoff@dqd.com> and the folks at
	ArsDigita.com. See doc/admin/config.txt for details.

	* A ns_tcl_abort command added for *.tcl pages.  It works just
	like ns_adp_abort.  Contributed by Rob Mayoff <mayoff@dqd.com>.

	* AuxConfigDir no longer runs files with "." or "#" as the first
	character.  Contributed by Mark Dalrymple <markd@arsdigita.com>.

	* The simple /NS/Admin and /NS/About interfaces have been removed
	in favor of a future ADP-based approach to web server
	administration.

	* Solaris now builds with -lresolv.

	* AuxConfigDir works again.  Contributed by Greg Kimberly
	<greg@GAK.COM>.

	* MaxOpen, MaxIdle database parameters work again.  Contributed by
	Rob Mayoff <mayoff@dqd.com>.

	* The external database driver now runs more efficiently on some
	Linux distributions using an ioctl.  Contributed by Paul Janzen
	<pcj@photo.sez.to>.

	* The former, correct behavior of manipulating the conn after an
	ns_return has returned.  Contributed by Jonathan Salz
	<jsalz@mit.edu>.

	* NsConnThread (nsd/serv.c) no longer get hung up if a
	Ns_CondTimedWait times out.  Contributed by Patrick Donohue
	<pdonohue@tcloud.net>.

	* Multithreading library (libnsthread.a) tuned up significantly.

	* Tcl library updated to Tcl 8.3, the latest production release.

	* nsd82 is now known as nsd8x.  nsd76 is still nsd76.

	* nsd Tcl stubs for 8.x and 7.6 have been abstracted into "*.cpp"
	files.

	* Win32 support for Windows NT/2000 i386 machines in the win32/
	directory.

	* Ns_CloseOnExec is now called when forking (nsd/unix.c).  We had
	a dilemma with forking processes and setting the close-on-exec
	flag in a multithreaded environment due to the inherent race
	condition between the fork, the exec, and the fcntl that sets the
	F_CLOEXEC flag.  The Arsdigita folks encountered a problem where
	the Oracle client libraries were forking, and this sometimes
	prevented a terminated server to free the port to which it was
	bound among other things.  So, before SockAccept, SockPipe, and
	SockBind, Ns_CloseOnExec is called to set the close-on-exec flag.
	Contributed by Mark Dalrymple <markd@arsdigita.com> and the
	AOLserver development team.


-----------------------------------
What's New in AOLserver 3 beta6.1
-----------------------------------

	* The -u command line flag was added to nsd to sepcify the
	username or uid at startup.  This replaces specifying the user in
	the config file.  This change accomplished three things:

           - Enhanced security ensuring the setuid() is performed at the
	   earliest possible time.

           - Provided a work around for a bug in the Linux pthread library
	   which was causing servers to hang on startup.

           - Allowed the interp used to evaluate nsd.tcl to be a regular,
	   non-safe interp as nsd.tcl no longer must be evaluated as root'
	   to determine the uid for the setuid() call.  This will allow
	   you more flexibility in interogating the system at startup,
	   e.g., using the exec command or sourcing additional files.

	* As with -u, the -g command line flag was also added to specify
	the group/gid to setgid() to after startup.  This replaces
	specifying the group in the config file.

	* Tcl 8.2 namespace procs and variables are now copied from the
	initial interp.  This is done by overriding the simple
	global-procs only copy procedure defined in nsd/tclinit.c with a
	more complex procedure in tcl/namespace.tcl.  Namespaces which are
	initialized at startup or through ns_eval should be copied as
	expected but this has not been tested extensively.

	* The .tcl dyanmic page format support from 2.x has returned via
	the tcl/file.tcl init script.

	* A few nsdb utilities from 2.x have returned in tcl/nsdb.tcl.

	* AOLpress network publishing support from AOLserver 2.x has been
	re-implemented in Tcl in tcl/fastpath.tcl.  The functionality was
	moved to Tcl from C to ensure the C code remains simple and fast
	for the ordinary case of returning static files.  Note that you
	must enable and config the nsperm module to use these procedures
	as the default configuration of the server is to disallow all HTTP
	methods used by AOLpress (e.g., MKDIR, PUT, DELETE, etc.)

	* Directory listings can be generated again in one of two ways.
	You can either configure an ADP file to be executed with:
	   	[ns/server/server1]
		directoryadp=mydirlist.adp
	Or config an ns_register_proc style procedure with:
	    	[ns/server/server1]
		directoryproc=myproc
	    A simple directory listing proc, _ns_dirlist, is included in
	    fastpath.tcl and is enabled by the AOLserver 2.x style config:
	    	[ns/server/server1]
		directorylisting=type
	    where type is one of "simple" or "fancy".  If both an ADP and
	    Tcl proc are defined the ADP will be used.
	
    	* Two new API's for executing Tcl procs and ADP's requests from
	other requests have been added:
	    	int Ns_AdpRequest(Ns_Conn *conn, char *adpfile);
	    	int Ns_TclRequest(Ns_Conn *conn, char *proc);
	    The directory listing support described above uses these
	    interfaces in nsd/fastpath.c.

	* The nscp module now replaces the standard "exit" command with a
	command which simply drops the connection instead of stopping the
	server.

	* The server can now maintain detailed timing statistics for each
	request.  When enabled, the server will record a high resolution
	time when the connection is queued, service starts, the connection
	is closed, and service is complete (i.e., after logging and such).
	The intervals between these times is then kept in a global and/or
	per-url counters.  To enable use, for example:
		[ns/server/server1]
		globalstats=on
		urlstats=on
		maxurlstats=100
	    This will maintain both global and per-url stats.  Only
	    statistics for the last 100 URLs will be kept.  To access
	    these data use the new "stats" and "urlstats" options to the
	    ns_server command.

	* The ns_conn command now supports the "start" option to return
	the time at which the connection was originally queued.
	
    	* There is a new framework for creating your own nsd binary which
	can support static linking of a module.  This is useful if you
	have to link against strange things like a messy C++ library.
	Basically you can do module-like initialization in an
	Ns_ServerInit() routine you provide, perhaps calling the new
	Ns_RegisterModule API.  There's no documentation yet but the use
	is straightforward - checkout the nsd/main.c and nsd/modload.c
	files for details.

	* Although actually new to beta5, the server now supports an ADP
	"errorpage" configuration to allow you to trap errors in an ADP
	page.  To use, point errorpage to a single ADP file, e.g.,:
		[ns/server/server1/adp]
		errorpage=/dir/showerrors.adp
	    When the server encounters an ADP error, instead of just
	    logging to the server log it will include your file, passing
	    the error string as an argument. 

	* The ns_share code for Tcl8.2 was fixed to avoid creating the
	underlying trace on each call which was dramatically slowing down
	the code.  This does not mean that ns_share is the preferred
	interface for sharing variables between threads.  Instead, please
	use the new nsv interface.  Nsv is both more efficient and will
	include new and useful features in future releases.

	* The Ns_QuoteHtml function and ns_quotehtml command now quote the
	' and " characters properly.

    	* New sockets are explicitly set non-blocking instead of assuming
	the non-blocking attributed is inherited from the accept() socket
	(as it should be).  This should correct problems of hanging
	threads on Solaris.

	* nsv_exists returns 0 instead of throwing an error on
	non-existant arrays

	* ADP now correctly sets the generally useless "conn" variable
	with the same form as that expected by the ns_conn command.

	* The default mimetype is now returned as "*/*" instead of NULL.
	This fixed a potential crash bug in ADP.

	* Keep-alive can now be disable by setting a timeout <= 0.

	* ns_sockopen command now correctly handles the -timeout
	parameter.

	* Fixed crash bug in "fancy" adp where tags are specified without
	values, e.g., <tag foo>.  Values default to the name of the tag,
	i.e., <tag foo> is equivalent to <tag foo=foo>.

	* Also in fancy adp, %'s and >'s within quoted attributes are now
	handled properly, e.g., <tag foo="bar%bar"> and <tag
	foo="bar>bar">.

	* Potential crash bug in the "errorpage" feature of ADP fixed.


----------------------------------------------------------------------

What's New in AOLserver 3 beta5:
---------------------------------

AOLserver 3 beta5 is a major new beta release since beta3.  There are
many changes to note, some of which may have been part of the beta4
release but where not documented.  Unfortunately there has not been
time to update the documentation on the http://www.aolserver.com/ web
site so many of the new features only have the brief descriptions below
(of course you can always check the source).

This document includes information on:

	*  New Features:  ns_share for 8.2 and much more.

	*  New Platform:  Apple's OS/X and a few fixes.

	*  Bug Fixes:  Several notable fixes.



New Features:
-------------

The following is list of major new features in AOLserver 3:


	*  Tcl 8.2 code upgraded to release 8.2.3.


	*  Harry Moreau (hmoreau@online.ie) completed Brent Welch's
(welch@acm.org) work on a trace-based ns_share command for Tcl 8.2.
The latest Tcl 8.2 trace API's, along with some clever use of namespaces,
allows ns_share to work without the extensive modifications of the Tcl
core which was required for Tcl 7.6.  This new implementation appears
to work well.  However...


	*  ... a new "nsv" command interface based on code from a similar
interface at Digital City has also been included as a preferred method
of sharing data between threads in Tcl.  The nsv interface is both more
efficient and supports many new features for race-free, multithreaded
variables.  In future releases, nsv will include additional functionality
from the Digital City code base including persistant backup files
and network based operation.  Its use over over ns_share is highly
encouraged.  If you're new to AOLserver please use the nsv interface.
The ns_share command, especially in Tcl 8.2., should only be used while
migrating legacy code to the new nsv interface.  Abbreviated documentation
for nsv is included in the file README.NSV in this directory.


	*  The ns_adp_parse command was made to operate as in AOLserver 2.x,
supporting both the -string and -file options.


	*  ADP will now return the mime type in the HTTP Content-type
header based on the filename extension as with ordinary static files.
As described in the AOLserver documentation, these types are configured
in the [ns/server/<server-name>/mimetypes] section.  As part of this
feature, the default types in the nsd/mimetypes.c file for .adp and
.dci extensions have been set to text/html instead of the previous
text/x-server-parsed-html values.  In addition...


	*  ... a new command "ns_adp_mimetype ?newtype?" can be used to
determine the mime type which will be sent to the client.  If the
optional ?newtype? argument is specified, that type will be used instead.
For example, and ADP file with a .adp extension could output plain text
instead of the default text/html with:


	<%
	ns_adp_mimetype text/plain
	ns_adp_puts " ... ordinary text with embedded HTML ... "
	%>

Note:  Setting the mime type with ns_adp_mimetype will have no effect
if the ns_adp_stream command has already been used as ns_adp_stream will
flush the headers and current mimetype.


	*  The ns_info command supports several new subcommands to list various
activities within the running server:


	ns_info callbacks

		Return all registered startup, pre-startup, shutdown,
		server shutdown, exit, and SIGHUP signal procs (e.g.,
		scripts registered for SIGHUP with ns_atsignal).

	ns_info scheduled

		Return all scheduled procedures (e.g., scripts scheduled
		with ns_schedule_proc).

	ns_info sockcallbacks

		Return all socket callbacks (e.g., the socket listening
		callback for the nscp module).


	ns_info threads
	
		List all running threads.

	ns_info locks

		List all mutex locks on the system.

The format of the result is a standard Tcl list-of-lists depending on
the information requested. A new C API routine, Ns_RegisterProcInfo,
can be used to help ns_info format the callback parameters.  The API
is currently not documented but it's use and implementation should be
clear by viewing the nsd/proc.c source file.

The locks subcommand is particularly interesting.  Our experience at
AOL is that a common performance problem with AOLserver sites is lock
contention.  Lock contention occurs when too many threads are attempting
to lock the same mutex.  The problem is difficult to detect in development
before full production.  To ease locating such "hot" mutex locks, the
locks subcommand fetches the name, total # of lock attempts, and the #
of lock attempts which did not succeed immediately, thus indicating a
possible lock contention problem.  However, the last value will always
be zero unless the server is running in "mutex metering" mode by setting
the following flag in the config file:

	[ns/threads]
	mutexmetering=on

When enabled, the nsthread library monitors lock use by first calling
Ns_MutexTryLock, calling Ns_MutexLock only if Ns_MutexTryLock does not
succeed in which case the # of failed lock attempts is also incremented.
Our experience at Digital City is that mutex metering adds no significant
load to the server and the information is so interesting we just always
have it enabled.


	*  A new C API, Ns_PurgeFiles, and Tcl command, ns_purgefiles, can
be used to purge like-named files from disk based on modified time.
For those of you familiar with VMS it's somewhat like the DCL "purge"
command.  For example, if you have a log file "foo" which some process
rolls to "foo.{date}" so that you have files like "foo.20000105",
"foo.20000106", etc., accumulating each day, you can purge all but the
last 100 most files with:


	ns_purgefiles /usr/local/as3/log/foo 1000

Note that you must provide the full pathname to the "base" file.
Those familar with the AOLserver 2.x API's may think this sounds familar
to the old Ns_RollFileByDate routine.  In fact it's the same.  The name
was changed because there is no actual "rolling" which happens with
Ns_PurgeFiles; there is only deleting.


	*  Using the Ns_PurgeFiles API, the nslog module now supports rolling
log files using a strftime(3) format string as with AOLserver 2.x.
This is enabled by setting the "rollfmt", "rollhour", and "maxbackup"
config parameters, e.g.,:


	[ns/server/server1/module/nslog]
	rollfmt=%Y%m%d
	maxbackup=100
	rollhour=1

This would roll the default file "access.log" to "access.log.YYYYMMDD"
(e.g., access.log.20000106) at 1am local time everyday, allowing for up
to 100 previous day's files.  Note that this configuration implies both
file renaming and removing which can be dangerous if misconfigured.
Please review the code in nslog/nslog.c and read the strftime(3) man
page before enabling such configuration.

	*  As an alternative, the ns_accesslog Tcl command has also returned
as documented.  This allows you to write a special script and register
it with ns_schedule_daily to roll and/or process your logs in any way
you see fit.

	*  The nslog module can also now be configured to buffer a configurable
number of lines before writing to the log file.  On a busy server this
can be used to significantly reduce the logging overhead as compared
to appending entries on each request.  While nslog is very careful to
flush any buffered entries before rolling or shutdown, there is still
the possibility entries can be lost if the server crashes and so this
feature is disabled by default.  To enable, set the "maxlines" config
parameter to a value > 0, e.g.,:


	[ns/server/server1/module/nslog]

	maxlines=100

This will buffer up to 100 lines before flushing to the log file.


	*  The new Ns_After/Ns_Cancel C API's and ns_after/ns_cancel Tcl commands
have been added for one-shot scheduled procecdures, e.g.:


	set id [ns_after 10 "ns_log notice foo"]

	ns_cancel $id

This will schedule the "ns_log ..." script to run once in 10 seconds and
then immediately cancel it so it never runs.  Note that the script may run
sometime after the 10 second delay if the scheduler is overloaded with
many stupid scripts which are not executing immediately as intended.
ns_after is equivelant to "ns_schedule_proc -once" and ns_cancel is
equivelant to ns_unschedule_proc (although ns_cancel will return 1 or 0
depending on whether the procedure was actually cancelled before being
run).  These API's and commands were added to encourage their frequent
use as the scheduler underwent a major interal re-write to efficiently
handle a large number of events (the previous scheduler was stupid).


	*  The Ns_Pause/Ns_Resume C API's and ns_pause/ns_resume Tcl commands
where also added to pause and resume scheduled procs.  Note that "pause"
means "don't run when next scheduled", not "stop if running now" which
would be very hard to implement.  Also, resume means allow running at next
scheduled time, not immediately if last time was missed.  For example, if
you ns_pause a script scheduled to run at midnight just before midnight
and ns_resume it just after midnight it will run the following day,
not immediately.  Here's another example:


	set id [ns_after 10 foo]

	ns_sleep 5

	ns_pause $id

	ns_sleep 30

	ns_resume $id

The script "foo" will execute in about 45 seconds, 35 seconds beyond the
original 10 second delay.  The extra 35 seconds represents the 5 second
and 30 second sleep time.  See the nsd/sched.c and nsd/tclsched.c source
files for details.


	*  Added the ns_addrybhost Tcl command which will return IP addresses
for the given hostname as the ns_hostbyaddr command returns hostnames
for the give IP addresss.  These routines cache their results using
a time-based Ns_Cache which can be configured with the "dnscache" and
"dnscachetimeout" parameters, e.g.,:


	[ns/parameters]

	dnscache=1;		# on by default

	dnscachetime=60;	# 60 minutes by default

See the nsd/dns.c source file for details.


	*  The AOLserver 2.x support for preserving or modifying the keys in
the HTTP header request has been re-enabled.  See the Ns_ParseHeader()
routine in nsd/conn.c for details.


	*  A common concern we hear from AOLserver skeptics is the issue of Tcl
performance "problems".  Our experience at AOL is that Tcl is rarely
a performance problem; the overall site architecture (in particular
dependence on slow databases) and poor caching and/or RPC networking
is normally the bottleneck.  The starting point of understanding where
a system's performance bottleneck may lie includes understanding how
often each command or procedure is executed.  To aid in this analysis,
AOLserver now supports a method to trace and count the execution of Tcl
commands across the server.  This feature is enabled with the "statlevel"
and "statmaxbuf" Tcl config options, e.g.,:


	[ns/server/server1/tcl]

	statlevel=100;	

	statmaxbuf=100;

The "statlevel" parameter indicates the procedure nesting depth to trace.
Either set it to something large, e.g., 100, to count everything or
something very low like 1 or 2 to count just the first or second level
commands.  The "statmaxbuf" command is the number of commands to count
in the current thread before flushing to the global table of counts.
This buffering is necessary to avoid lock contention around the global
table on a busy server.

To access the collected data use the "ns_stats" command:


	ns_stats ?-sort? ?pattern?

The -sort flag can be either "-count" or "-name" to sort the results
by command name or total count and "pattern" is a glob-style pattern
to select commands, e.g., the following will return a list of all ADP
commands sorted by most used:


	ns_stats -count ns_adp_*

Note that commands never used will not show up in the list.  See the
nsd/tclstats.c source file for more details.


	*  The nscp module was simplified to be more portable and reduce the
load on the server.  The downside is the fancy readline-like interactive
features are now gone.  To use nscp, simply telnet to the configured port
and enter interactive commands.  To log out simply drop the connection
or press Ctrl-D on a new line.  Note that dropping the connection will
not stop some long running script you entered such as "while 1 {set
foo bar}" as the nscp thread will be busy executing your script and
will not notice the connection is dropped.  Therefore, you should be
careful with the sorts of scripts you execute with the nscp interface.
See the nscp/nscp.c source file for details.


	*  As suggested by Robert Ennals (roberte@sco.com), threads created on the
Solaris and UnixWare are now all "system-scope".  System scope threads
are created and scheduled directly by the kernel and not the 2-level
thread library.  The kernel threads on these platforms, called "LWP's",
can be observed by using the -L flag to ps, output that will look familar
to someone who has used ps on a Linux or SGI-sproc platform and seen
multiple AOLserver nsd processes.  A conversation with engineers at Sun on
the issue convinced us that system-scope should be almost always right.
See the thread/pthread.c source file for details.  See below for more
information on thread scope issues.

	*  Finally, much of the basic configuration code throughout the core
server was consolidated into a single location in the nsconf.c source
file.  This file collects most of the config data into a single global
structure, nsconf.  It also logs the various config parameters to the
server log at startup.  This dumps quite a few lines into the log but
was done to address a long standing problem with the AOLserver which was
understanding the large set, and often undocumented, set of configuration
parameters.



New Platforms:
--------------

Pete Jansson (petej@clickvision.com) contributed modifications to support
Apple's new OS/X operating system.  This includes both a "cthread"
threading interface and special dynamic loading code along with a few
minor hacks because OS/X is still more BSD-like than SysV or Posix-like.
See the thread/cthread.c and nsd/modload.c source files for much of the
OS/X work.  The OS/X fixes also helped locate and correct a few problems
with the FreeBSD port (e.g., GMT offsets in various time routines).
BTW:  NetBSD was investigated but, unlike FreeBSD, was found to include
no supported thread library which was somewhat surprising.

In addition, the makefiles and makevars have been cleaned up and
several small bugs where fixed (e.g., incorrect use of -lc on Linux,
missing -pthread on FreeBSD).  The makevars file also now supports the
GNU compiler by default which has been tested on most major platforms.
This should allow AOLserver to be built without the expensive vendor
compiler, a common and long standing complaint from the OpenSource
community.

Finally, much work was done to return, after being absent for several
years, support for running AOLserver on Win32 (Windows NT, 2000, 98).
These changes were not ready for this release but look for them in the
next beta or final release of 3.



Bug Fixes:
----------

The following notable bugs where fixed in this release:

	*  Linux freezes on startup (explicit -lc masking fork and exec wrappers
in -lpthread).

	*  Can't POST to a Linux server (trailing \r\n must be read before
closing socket).

	*  HP/UX 10/11 freezes after spawning a process with Tcl "exec" (vfork()
instead of fork() confusing thread library).

	*  Tcl filters registered with ns_register_filter send the old "conn"
argument (uninitialized filter structure).

	*  Double counting of bytes sent for static files over 8k (SendFile and
WriteConn both counting bytes).


