# $Id: ChangeLog,v 1.23 2003/12/30 16:21:06 aleigh Exp $

- Mark 4 mod 1 rc3

+ Added lstFset_badd()

+ Added memFdup()

- Mark 4 mod 1 rc3

- Mark 4 mod 1 rc2

+ Added memFalloc, memFfree, memFrealloc in mecha.

+ Converted bcopy() to memFcopy() in mecha.

+ Converted bzero() to memFclear() in mecha.

+ Changed #include directives in mecha to include the literal path.

- Mark 4 mod 1 rc1

+ XML Parser now supports comments

+ Added int utlFip_match(unsigned int ipa, unsigned int ipb, unsigned int netmask)

+ Fixed an issue where bspFdestroy() could double-destruct a user data
  pointer.

+ Fixed an issue where a blank extension would trigger an assertion
  in siteFfind_mimetype.

+ New function xmlFcreate_list();

+ SSL support via OpenSSL Library

+ Removed OpenBSD, FreeBSD configuration targets

+ Removed old un-used functions checks from configure

+ Changed utlFhttp_time_print() to be recursive.
 
+ added mem.c

+ Added dynFreset()

+ Removed version information from mod/http

+ Removed version information from mod/site

- Mark 4 mod 0

+ Changed the format of the output line when a library is linked

+ Solved a synchronization problem in the thread-pool.

+ Added fleFget_size(), fleFload_file()

+ Added strFis_whitespace()

+ Removed old qry API

+ Moved qryF* into qry.c

+ Added netTreader *netFreader_init(void), void netFreader_free(netTreader *reader);

+ disF* interface moved to dis.c

+ Moved b64, bsp, bus, crc, dyn, fle, hsh, log, lst, rnd, str, thr, 
  tls, uid and utl to new "mechanism" library. 

+ pckF* interface moved to lst.c / lstF*

+ uuidF* interface moved to uid.c / uidF*

+ utlF* interface moved into utl.c

+ hshFlist_* interface moved to hsh_dep.c

+ utlFurl_encode() and utlFurl_decode() now return int status instead
  of a pointer to the string. The encoded string can be found inside
  the dynbuffer.

+ Added dynFgetstr(), dynFgetlen()

+ Seperated the lstFlist* code into lst_void.c

+ strFdup() deprecated, strFcopy() instead.

+ Changed types in networking functions; size_t -> ssize_t

+ Disabled delayed-thread-creation in the thread pools.

- Mark 3 mod 7

+ mod/php: Country-code now added as $_SERVER["country_code"] if present in the
  transaction.

+ Added hash iterator code.

+ Added new code bus.c for a bus data structure.

+ Added new raw hashing calls for hashing void pointers where
  the object representing the name is not a text string.

+ Added a new set of convinience hashing calls for dealing with
  integer keys.

+ Added mod/outboard, for two-task IPC processing.

+ Added unsigned int rndFnumber (void)

+ Added new IPC handling code built on the SysV message queue interface.



- Mark 3 mod 6

+ Removed the annoying size debug message.

+ Removed "did not find mime-type" message.

+ Added _netFwritef which takes char *fmt, va_list

+ Added httpFwritef() which takes *fmt, ...

+ Code re-formatting and error message updating for tpool.c

+ tpool now tracks in-use threads, and started threads, via the tpool structure.

+ Removed dispatcher startup messages.

+ Removed the triggering message on timeout sockets.

+ Modified the thread-pool so that threads are only created when there are less than the max
  number of configured threads, but, the no threads are available to process a work element.
  Threads will still never be destroyed. This will allow people to set relatively high thread
  maximums while only using the resources they actually need.

+ Removed continuity startup broadcast messages.

+ Removed mod/http short request message.

+ Updated release header for http.h, which was missing httpFread()

+ Removed mod/oracle checkin/checkout messages.



- Mark 3 mod 5

+ Removed the pthread_cond functionality under LINUX for the startup wait.
  instead the threads pin every 500ms checking the startup condition. On Linux
  if threads go into pthread_cond_wait, then the process changes uid and triggers
  the conditional, the blocked threads do not fire.

+ Modified crt paths to support the Forte 7 compiler

+ Checks for -lresolv, inet_aton() moved here

+ New ip= option for dispatcher to set the bind IP. Defaults to
  0 (*) if unset in the configuration.

+ Brought back BUG 10022

+ Fixed a problem in the php POST read function that was preventing
  file upload from working properly.



- Mark 3 mod 4

 + Improved interior header files.

 + Removed a bug in hshFvoid_del()

 + Removed old dead ring code.

 + Started transitioning error messages to use sterror()

 + -Wall now default for GCC builds

 = Moved REQ_ constants from continuity.h into mod/http.

 + Added new transaction status REQ_HEADERSENT.

 = httpFstart_response no() longer sends the headers.

 + httpFhandler now calls httpFsend_response() if the transaction finishes
   and the status is still REQ_STARTED.

 + Added netFwrite_two() and netFwritev()

 + mod/general do_error() now calls httpFsend_response()

 + reponse headers now arrive in same packet as the first data.

 + moved REQ_* and included new netF() functions in the release headers.

 + re-instituted TCP_NODELAY

 + I/O completly remodeled to use poll() and to guarantee read to worker threads

 + New profiling capability: define CAPI_PROFILE in continuity.h
 
 + New options for the dispatcher, threads and queue.

 + Failure to dlopen() a .so is now a fatal error.



- Mark 3 mod 3

        ID PRODUCT_OS SUBPRODUCT SDESC
---------- ---------- ---------- ---------------------------------------------
     10003 generic    modhttp    404 needs to happen in send_file
     10009 darwin6.1  modphp     php won't compile on OSX
     10011 generic    modhttp    docpath not documented
     10013 generic    modhttp    req_uri vanished
     10014 darwin6.2  continuity xfrFmmap does not work on OSX



- Mark 3 mod 1



- Mark 3 Mod 0

 + Added stub code for mod/tcl_http

 + Re-Introduced mod/tcl. Rewrote the module so that it supposed the concept
   of Tcl Worlds, which allow for multiple things to use interpreter pools.
   
 + Introduced mod/voice, a VRU processing platform.

 + Moved the rdwr code from compat into core, as this is going to be used on all
   the platforms due to semantical difficulties with the way the unlock function
   is called.

 + Build makefile.in's now take care to ./configure

 + Deprecated the incr stat function.

 + mod/tcl now has a sketched out interface for multiple TCL worlds.

 + Cleaned up dispatcher to have a single interface.

 + continuity no longer takes the -p or -a options.

 + Removed all the modules from the build except for TCL.
   The TCL module is going to be genericized to only offer
   the TCL functionality without any HTTP functions. 

 + Removed include/capi.h. This file is now deprecated.
   The public module include will be continuity.h for the platform,
   with the addition of http.h for the webserver functionality.

 + Removed balance.c and associated functions.

 + Removed qry functions that used qryTent. The lstTset interface
   is now the only supported interface.

 + Removed dead symlink call from file.c

 + Removed http.c, and all functions from dl.c, net.c, xfer.c, etc that
   referenced httpTtrans. 



- mk2 mod15

 + Added client_read variable to the httpTtrans structure for keeping
   track of post reads.



- mk2 mod14

 + Error dump page now contains the hostname.

 + Dialer now supports pgmid parameter.



- 2.0.13

 + New -u option for setting user.

 + dispatcher split up to setup / run phase, to allow
   setuid activity after the ports are bound.

 + check-type strips trailing slashes.

 + New TCL command ta_http_query_get

 + httpTtrans now contains a new element. OLD MODULES
   WILL HAVE TO BE RECOMPILED.

 + dynFappend() was not actually honoring len on copy.

 + HTTP 201 response was malformed.

 + Solaris target now is enabled for pre-fetching.

 + Continuity now has a single-shot build which provides marked
   optimization performance. 

 + utlFurl_decode now converts +'s into spaces

 + ID based messages, which will eventually be backed by some form of
   loaded NLS.

 + Certain situations resulting in a valid result->error from TCL
   that did not have a global error would result in a crash.

 + New mod/general function redirect_master, allowing for
   site-level redirection.

 + New mod/general function travel_page which is a simple
   virtual URL that will redirect to a provided URL.

 + New mod/general function ipsec_check which will allow for 
   site based IP access lists.

 + New mod/general function lower_uri which will take the URI
   in t->vars and make it all lowercase for case insensitive
   websites.

 + pthread_rwlock compatability interface now changed to be more
   like the POSIX standard. rdwr calls are now not included unless
   the pthread_rwlock interface is missing on the platform.



- 2.0.12

 + New tav_ vector TCL commands.

 + Fixed broken BSP subsystem.

 + Introduced new hsh.c void interface that will eventually
   replace the old API.

 + if-modified-since and last-modified now work properly
   with sendfile

 + mod/tcl now traps init script errors.

 + mod/tcl all aspects of TCL error trapping are now useful and
   verbose, TCL script backtraces are provided.

 + dl.c no longer logs loaded shared library loads.

 + TCL now does the right thing in regards to TLS.

 + Unbroke TLS/Oracle.

 + tls now uses UUID for memory handle.

 + Created a thread to run the mmap cleanup every 60 seconds. This will
   prevent the server from accumulating maps over time.

 + Fixed an overflow in the UUID handler which could cause a crash.



- 2.0.11

 + mod/beacon now adds memory information to tasF (Solaris)

 + mod/beacon now adds CPU metrics (Solaris) 

 + Added w_err_eagain, w_err_estale, and w_err_epipe counters
   in net.0 



- 2.0.10

 + Changed the http short request error to a warning.

 + mod/general's logging format is changed back to match 
   CDP's 1.1 by the inclusion of two placeholder values.

 + mod/general now creates access log files that always have
   two digit values for day and year.

 + mod/general now appends the hostname of the machine on the end
   of the access log.

 + Additional changes to support 64-bits.

 + Fixed broken dispatcher behavior which was causing the server
   to pipeline.

 + httpFparse now URL decodes the path parameter before inserting
   it into t->vars



- 2.0.9

 + Replaced dynamic memory handling in the TCL commands

 + I/O is now non-blocking

 + Added mod/beacon

 + Modifications for 64-bit

 + Added a statistics interface for use with the rrd
   tool, and other applications.

 + New TCL commands: ta_urlencode, ta_urldecode



- 2.0.8

 + mod/general, created do_404 for generic 404 handling. find_index
   will now 404 if the request was for a directory but no matching
   index pages were found.

 + Added a new module, mod/image, which is essnetially libjpeg
   with some TCL binder functions.

 + tclFinit now takes arg init= which specifies tcl loadfile

 + New TCL commands: ta_db_open, ta_db_select, ta_db_getrow,
   ta_jpg_getsize

 + Removed broken and useless structure defenitions from tcl_pub.h

 + Restructured the TLS system to take dynamic cleanup handlers,
   and to allocate the classes at runtime.

 + Added a select() timeout function for the reads, 5 seconds.

 + Removed the extra trailing space from utlFlocal_time().
 
 + Introduced cdog watchdog program.



- 2.0.7

 + Log output now includes time.

 + Fixed a bug in commonlog that would cause the timezone offset
   to appear as a random, corrupted string.

 + mod/general now exits at startup if it cannot load the
   instance.cfg.

 + Hardened http parser.

 + Added new functions qryFlst_parse(), utlFurl_encode(),
   utlFurl_decode(), dynFfree(), utlFlocal_time(), uuidFgenerate_str()

 + Added new TCL functions: tcl_http_var_set, tcl_http_res_set, 
   tcl_http_req_set, ta_pwd, ta_http_vars_get, ta_http_req_get,
   ta_http_res_get.

 + Fixed a structure containment problem in mod/tcl, due to an
   improper assignment with dyn command. Thanks eric.

 + Fixed a leak. The handler has to free the passed disTconn
   structure.

 + Added dynFappend_print()

 + Moved back to an emphasis on shlibs, with RTLD_GLOBAL on
   Linux and Solaris allowing x-calls between modules.

 + MMC system now logs %d/errno rather than %m

 + MMC system now logs the logFmsg() service rather than logging
   errors to syslog.

 + t->vars:path is now cleaned of extra slashes before it's added
   to the set.

 + Removed an extra space after the time from the mod/general
   access log.

 + OpenBSD port is being dropped because their linker does not support
   --no-whole-archive, which breaks the continuity link.

 + Re-Organized distribution, with bin, lib, and include directories.

 + Added a new function, dlFmap_funcs that can be called from the
   module.cfg with a funcs= argument. This will map functions from
   RTLD_DEFAULT, rather than a shared library. This is required to 
   call functions in the core build from the module.cfg

 + Moved to .a compilation format. On installation the end-user
   will perform the final link step. This allows for linking
   against arbitrary end-user libraries, as well as providing a
   mechanism to allow the libraries to cross-call one another without
   the performance penalties or hassles of going through dlsym. 

 + mod/tcl is now included in the standard distribution.

 + send_file now returns the content-length.

 + mod/tcl is now functional for embedded pages.

 + Added proper functiond decl's to stat.h

 + Moved mod/tcl source in.

 + Added mod/oracle, and OCI based Oracle interface library.



- 2.0.6 (v2.00 p6)

 + Changing version numbering to a more realistic style.
 
 + Modified build message. Continuity is now 
   "Continuity Enterprise Edition". Build message also now
   reflects Production/Development and 320-bit/64-bit.

 + Modified the server variable on the return HTTP response
   to include the version number rather than a hardcoded 2.00

 + Generalized the dispatcher so that alternative handlers
   can be registered.



- v2.00 p5

 + Added ability for modules to get transaction with
   httpFthread_gettrans(void). This is implemented through TLS
   and was required for modtcl.

 + Changed the req_line buffer in httpFparse to 1k.

 + Added netFwrite() as documented.

 + removed dietlibc options from configure

 + t->cli_ipv4_address is now guaranteed to be host order. This was
   causing problems with the logs on little endian platforms.

 + utlFip_to_str was not formatting the IP address properly.

 + Number of threads and runq size are now tunable from module.cfg using
   set_option. The parameters are "threads" and "runq_size".

 + New global configuration calls, get_option and set_option. 



- v2.00 p4

 + continuity now supports the -a option, for binding to a specific IP
   address.

 + The list code had two issues: one, it was losing entries on realloc
   and it was over-freeing one entry. Well. realloc() with mtmalloc is still
   broken. Here's the deal, at this point I think mtmalloc is just fucked
   after you realloc() memory and it changes it out from under you. This is
   too bad because mtmalloc is really fast. 

 + httpFparse was not properly storing the HTTP request variables
   in t->req_hdrs, problems such as spacing and cutting values at the ':'	

 + mod/general now looks for group.siteid instead of siteid.group

 + Hard 404 page now sets the type as text/html

 + Fixed the return values from httpFparse, which was possible causing
   bad requests to make it through to processing.

 + mod/general now includes find_index, which will for a configured list
   of index pages for requests that are directories. 

 + mod/general no longer tries to log the country code for the request.
   The ccode is only present when mod/iplk is running, and mod/iplk is 
   proprietary to CyberDataProcessing. 

 + Moved the WLOG call into the http handler from the http
   cleanup code, because WLOG was being called for aborted
   and broken connections.

 + On OpenBSD, thrFsleep() now locks the mutex before calling
   pthread_cond_timeout. Apparently OBSd requires the mutex be
   locked, or, it returns EINVAL. 

 + accept() trapping eith EINTR will call intr_handler() on OpenBSD. This is
   so that ctl+c will interrupt the running process properly.

 + Modified the way the fputs weirdness trap works in mod/general/log.c



- v2.00 p3

 + PHP4 no longer leaks.

 + Significantly improved the thread pooling performance.

 + removed cache miss message from utlFtime

 + Thread pooling is now the default. This is generally a good idea,
   I suppose, but it's basically being required by PHP which can't
   deal with threads that are destroyed.

 + dl.c will now try preprending _ to the function names if they are not
   found. This helps on platforms like openbsd which insist on putting a
   leading underscore in the fn names for shared libraries.

 + No longer trying to use sigignore at all.

 + find_pathinfo now sets the type to internal/directory for directories,
   regardless of extension.

 + find_pathinfo will now 302 uri's for directories that are missing their
   trailing /

 + Linux builds now sense mmap() properly. Before they were using a read()
   loop as a fallback, causing horrible performance.

 + mod/general/log.c was expecting fputs() to be the num bytes written.
   On Linux, this just seems to return 1 on success. #ifdef'd around the
   return check.



- v2.00 p2

 + dl now honors type= setting for the service functions. The function
   will only run if the type for the request is in the comma seperated list. 
   To run for all types, do not specify type.

 + pathinfo now returns a hard 404 error when the stat() fails.

 + trans now carries started, which indicates at which point the request
   is at. Dispatch won't run the obj or service classes unless started
   is 0.

 + Source now uses capi.h, the public API header file. Duplicate
   defenitions removed from the other headers.

 + Added an -enable-diet target, which is broken, because
   diet-libc SUCKS AND MUST BE DESTROYED

 + Inclusion of strings.h is now based on configure. strings.h
   is discouraged by diet libc on Linux.

 + xfr.c no longer uses pwrite, because pwrite()ing a socket under
   RH7 is not legal, and it was pointless anyways.

 + -c now works properly rather than opening "module.cfg" regardless.

- v2.00 p1
