1998-07-27  Lele Gaifax  <lele@paci.nautilus>

	mod_pyapache.c: Release 4.14.
	
	* mod_pyapache.c (setup_environ): Use renamed ap_table_elts if
	Apache 1.3.1.

	* NEWS, INSTALL, BUGS: New files.

	* mod_pyapache.c (execute_python_script): Save and restore the
	Python thread state. This is needed since we can be called back
	from within the script, for example when a Location: header
	appears.
	(parse_headers): removed #ifdef HANDLE_LOCATION_HEADER.

1998-07-25  Lele Gaifax  <lele@paci.nautilus>

	* mod_pyapache.c: Release 4.13.
	
	* mod_pyapache.c (exec_the_script): Don't set __builtins__,
	Py_Initialize() and Py_NewInterpreter() already take care of it.

Fri Jul 24 23:30:39 1998  Lele Gaifax  <lele@nautilus.nautilus>

	* mod_pyapache.c: Release 4.12.
	
	* mod_pyapache.c (parse_headers): Braketed the buggy handling of
	Location with an #ifdef, disabled by default. Set
	HANDLE_LOCATION_HEADER to 1 to activate it.

1998-07-24  Lele Gaifax  <lele@paci.nautilus>

	* mod_pyapache.c (get_python_path): Removed.
	(execute_python_script): Set the path in the right way: just
	insert it at the beginning of the existing path.
	(pyapache_init): likewise.

Fri Jul 17 00:08:22 1998  Lele Gaifax  <lele@nautilus.nautilus>

	* mod_pyapache.c (parse_headers): Handle Location header (EXPERIMENTAL).
	(exec_the_script): Put __persistdict__ in __builtins__ instead of
	__main__. 

	* mod_pyapache.?: Fixed the copyright: as Gregor Hoffleit pointed
 	out, my previous statement simply didn't make sense.

Thu Jul 16 23:46:40 1998  Guillaume Randon <g-randon@torino.matra-dtv.fr>

	* mod_pyapache.c (pyapache_init): Initialize threads if WITH_THREAD.

Mon Jul  6 23:57:25 1998  Lele Gaifax  <lele@nautilus.nautilus>

	* mod_pyapache.c: Release 4.11.

1998-07-06  Lele Gaifax  <lele@paci.nautilus>

	* mod_pyapache.h (pyapache_server_config): Added server_dict, a
	server-wide name space.

	* mod_pyapache.c (handle_header): Extracted from parse_headers().
	(parse_headers): fixed a subtle bug, a spurious eoln written back
	after the headers, noted by Thomas Kock: it was triggered only
	when writing the entire page at once, as he does.
	(parse_headers): better handling of consecutive print statements

Fri Jun 19 01:11:21 1998  Lele Gaifax  <lele@nautilus.nautilus>

	* mod_pyapache.c: Release 4.10.

Thu Jun 18 19:45:42 1998  Lele Gaifax  <lele@nautilus.nautilus>

	* mod_pyapache.c (struct ApacheBuff): Fixed a subtle bug in the
 	rebuffering code: use unsigned char type for read_buffer and
 	read_buffer_ptr.
	(exec_the_script): generalized to be called without a
 	pyapache_req_stuff around.
	(pyapache_init): rudimental StartupScript handling.

	* README: tell something about PyApacheStartupScript.

Sun Jun 14 23:33:02 1998  Lele Gaifax  <lele@nautilus.nautilus.eclipse.it>

	* mod_pyapache.c: Release 4.9.

	* README: Clarified .pyc/.pyo handling.

Wed Jun 10 23:05:25 1998  Lele Gaifax  <lele@nautilus.nautilus.eclipse.it>

	* mod_pyapache.c: Implemented the .tell() method. 
	(python_handler): Ripristined setting of Py_VerboseFlag and
	Py_DebugFlag. 

Sat Jun  6 11:59:02 1998  Lele Gaifax  <lele@nautilus.nautilus.eclipse.it>

	* mod_pyapache.c (MODULE-DEFINITION): strip \t and \r too.

	* README: Revised.

Fri Jun  5 01:27:49 1998  Lele Gaifax  <lele@nautilus.nautilus.eclipse.it>

	* mod_pyapache.c: Release 4.7.

Wed Jun  3 18:36:26 1998  Lele Gaifax  <lele@nautilus.nautilus.eclipse.it>

	* mod_pyapache.c (ApacheBuff_read): typo fixed.
	(ApacheBuff_readlines): likewise.
	( MMODULEODULE-DEFINITION): pass \012 instead of \n to tr .
	(ApacheBuff_read): great&old bug fixed: how did it happen that the
	exit condition wasn't tested at all??!?!?
	(ab_fread): Rewritten.

Sun May 31 22:42:19 1998  Lele Gaifax  <lele@nautilus.nautilus.eclipse.it>

	* mod_pyapache.c: Release 4.6.

Sat May 30 18:59:58 1998  Lele Gaifax  <lele@nautilus.nautilus.eclipse.it>

	* mod_pyapache.c (ApacheBuff_readlines): New function.
	(getline): replaced with fileobject.c implementation.
	(exec_the_script): Do not use PyOS_GetLastModificationTime(): the
	server already provide the same information in the request_rec.
	(exec_the_script): Check for the pyo compiled version too.
	(ApacheBuff_methods): Added the readlines method.

Sun May 24 22:53:17 1998  Lele Gaifax  <lele@nautilus.nautilus.eclipse.it>

	* mod_pyapache.c: Release 4.5.

Fri May 22 20:04:40 1998  Lele Gaifax  <lele@nautilus.nautilus.eclipse.it>

	* mod_pyapache.c (execute_python_script): Bug fixed. Removed the
 	double DECREF on buff: Python 1.5 is cleaner on destroying
 	everything at exit.

Sun May 17 21:26:58 1998  Lele Gaifax  <lele@nautilus.nautilus.eclipse.it>

	* mod_pyapache.c: Release 4.4.
	* mod_pyapache.c: Update to 1.3b6 API. Added autosetup of
	libraries used by the python runtime.

Mon Mar 30 22:28:20 1998  Lele Gaifax  <lele@nautilus.nautilus.eclipse.it>

	* mod_pyapache.c: Release 4.3.
	* mod_pyapache.c (ApacheBuff_write): Bug fixed: do not set
	r->status with meets_condition()!!
	(check_compiled_module): Reintegrated.
	(exec_the_script): Likewise. Don't check script's exit status.
	* apache_api.[ch]: Definitively dropped.

Sun Jan 25 10:37:30 1998  Lele Gaifax  <lele@nautilus.eclipse.it>

	* mod_pyapache.c: Release 4.2.
	I totally reworked the module, simplifying it a lot by removing
	uninteresting functionalities. Now it behaves always as the
	previous releases in Persistent and Trusted modality, ie the
	Interpreter is initialized once and never shutted down. 

	* README: Updated for 4.2.
	* Configuration.chunk: likewise.

Tue Sep  2 18:09:08 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* mod_pyapache.c (pyapache_init): Initialize the PyApache module.

	* apache_apy.h (python_dir_config): moved here, from mod_pyapache.c.
	(python_server_config): likewise.

	* apache_apy.c (ApacheConnection_methods): New read() method.

Mon Sep  1 20:46:15 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* apache_apy.c (ApacheRequest_stream): accept a flag as argument,
	to enable/disable header parsing.

Sun Aug 31 18:51:23 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* mod_pyapache.c (python_dir_config): Added the ``handler'' slot. 
	(python_server_config): New structure, holding the configuration
	options for the server.
	(get_python_path): Deal with both per_dir and per_server cases. 
	(pyapache_cmds): Added PyApacheHandler and PyApachePath
	directives. 
	(pyapache_handler): New entry point for custom handlers.
	(pyapache_init): Initialize Python here, end execute startup
	script if present.
	(initialize_python_environment): Use the standard Py_Initialize()
	call.

Thu Aug 28 18:44:45 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* mod_pyapache.c (python_cmds): Added PythonStartupScript.

Mon Aug 25 18:46:02 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* apache_apy.c (ApacheRequest_memberlist): updated with missing
	fields. 
	(ApacheRequest_compmemberlist): likewise.

Fri Aug 22 21:01:07 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* apache_apy.c (ApacheTable_ass_sub): Implemented.

Thu Aug 14 10:03:12 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* apache_apy.c (initialize_apache_module): Added httpd.h constants
	to the module's dictionary.

	* mod_pyapache.c: Moved the API support to apache_apy.c.

	* apache_apy.c: New file, containing the API to the server.

Wed Aug 13 10:54:43 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* mod_pyapache.c: Moved to src/modules/PyApache. Installation
	instruction moved in a section of the README.PyApache.	

Tue Aug 12 13:05:19 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/mod_pyapache.c (set_python_debug): Use the FLAG arg type.
	(set_python_verbose): likewise.
	(set_python_persistent): likewise.
	(set_python_trusted_scripts): likewise.

Mon Aug 11 16:23:36 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/mod_pyapache.c (init_pyapache_version): Handle
	``export -kv''. This is needed to maintain a common revision
	number, since others may start using CVS on the module. 

Thu Aug  7 22:52:23 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/mod_pyapache.c (initialize_python_environment): Add
	"PyApache_VERSION" to the environment.
	(init_pyapache_version): New function, as module's
	initializer. Just set PyApache_version.
	(initialize_apache_module): Use the new global version variable.

Thu Jul 31 01:03:16 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/mod_pyapache.c: Added a note about module availability as
	well as dedicated web page.

Wed Jul 30 19:26:27 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/mod_pyapache.c: Added an ALLOCA() macro, to make it easier
	getting rid of alloca() on systems that misses it or with a bad
	implementation.
	(set_cmdline_args): use it.
	(parse_headers): likewise.

Thu Jul 24 22:36:33 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/mod_pyapache.c: Fixed write-content-hooks: the function must
	return nil, otherwise Emacs considers the buffer already written.

Thu Jul 24 22:33:28 1997  Alejandro Escalante Medina <amedina@msg.com.mx>

	* src/mod_pyapache.c (ApacheBuff_close): Added another no-op
	method, for compatibility with existing programs.
	* src/mod_pyapache.c (parse_headers): Bug fixed: wasn't allocating
	enough space for the ending '\0' in the buffer.

Thu Jul 24 01:02:27 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/mod_pyapache.c: Untabified, and added an Emacs write-hook to
	automatically do it. This should make easier sharing patches with
	the rest of the world.

Sat Jul 19 13:14:50 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/mod_pyapache.c (set_cmdline_args): Functionally equivalent
	to util_script::create_argv(), made static after 1.2b7.
	(initialize_python_environment): Use it, thus dropping a
	dependency on a patch to the server's util_script.c.

Thu Jul  3 00:14:51 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/mod_pyapache.c (parse_headers): Recog Content-Length and
	Transfer-Encoding too.

Wed May  7 19:34:38 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/util_script.c: export create_argv() again. 
	* src/mod_pyapache.c (child_execute_python_script): Updated with
	b10 changes.
	(copy_client_result): Likewise.
	(initialize_apache_module): Added __version__ member.

Sat May  3 11:59:15 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/mod_pyapache.c (getline): First cut at a ApacheBuff:readline
	method. This is because cgi.py needs .readline().

Thu May  1 13:04:14 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/mod_pyapache.c: Additional Linux recipe from Daniel Walton
	<dan@okdirect.com>. Thanx

Wed Apr 30 18:19:35 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/mod_pyapache.c (alloca): Do not define it if it's already.

Mon Apr 28 20:07:24 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/mod_pyapache.c (exec_the_script): Try to avoid multiple
	clients trying to write the compiled code at the same time. Thanx
	again to Larry for reporting the problem.

Wed Apr 23 18:53:26 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/mod_pyapache.c (exec_the_script): Close the file handles
	once the code is loaded. An embarrassed thanx to
	Larry Drebes <ltd@four11.com>.

Thu Apr 10 19:31:23 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/mod_pyapache.c (child_execute_python_script): Aligned with
 	1.2b7: call reset_timeout() each time something gets read.

Tue Mar 18 18:47:29 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/mod_pyapache.c: Added a note about PyApache on Linux.

Fri Mar  7 18:27:09 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/mod_pyapache.c (HAVE_ALLOCA_H): Define it to 1.
	(struct ApacheBuff): Added `f_softspace', needed by Python's
	print command. 
	(python_dir_config): Added the persistent and trusted_scripts
	flags, to make those functionalities work on a per directory basis.
	(set_python_persistent): Set the relative flag in the per-dir-slot.
	(set_python_trusted_scripts): likewise.
	(create_python_dir_config): Initialize the flags respectively to
	PythonPersistent and PythonTrustedScripts, than now are macros.

Wed Mar  5 22:14:56 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/mod_pyapache.c (persistent_execute_python_script): Don't
	propagate exception, since we are using Apache's log facility.

Wed Jan 22 14:29:59 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/mod_pyapache.c: Some more recipe notes for compilation.

Wed Jan 15 14:19:03 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/mod_pyapache.c (exec_the_script): Print the eventual error
	occurred while parsing or compiling the script.

Wed Jan  8 15:01:21 1997  Lele Gaifax  <lele@nautilus.eclipse.it>

	* htdocs/manual/mod/mod_pyapache.html: New file, translated from
	mod_pyapache.tex. 

	* src/mod_pyapache.c (check): Check for OPT_EXECCGI.
	(check): Call setup_client_block().
	(initialize_python_environment): If there aren't arguments, use
	argv0, not the entire filename, as the script's name.
	(copy_client_result): Mimic latest Apache's behaviour.
	(child_execute_python_script): Remember child's process ID.
	(child_execute_python_script): Mimic latest Apache's behaviour by
	using the new should_client_block() and get_client_block()
	functions. 
	(child_execute_python_script): Wait for the child's end in case of
	NPH script.

Sat Nov  9 19:06:09 1996  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/mod_pyapache.c: Untabified.

Fri Nov  8 11:33:54 1996  Lele Gaifax  <lele@nautilus.eclipse.it>

	* manual/mod_pyapache.tex: Updated.
	(subsection{Apache Module}): Extended a little.

	* src/mod_pyapache.c: Almost useless alloca declaration. 

Thu Nov  7 11:19:18 1996  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/mod_pyapache.c (initialize_python_environment): Deal with
	non-dictionary environ (it may be a subclass of UserDict). 

	Include needed Apache headers, and declare the missing
	PyOS_GetLastModificationTime(). Now `gcc -Wall' compiles it
	cleanly.

Wed Oct 30 10:15:54 1996  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/mod_pyapache.c: Updated for Python 1.4.

Thu Aug 22 10:30:31 1996  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/mod_pyapache.c: Added a comment about troubles with URL
	redirection in PersistentMode.

Wed Jun 26 12:11:03 1996  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/mod_pyapache.c (log_malformed): new function.
	(parse_headers): parse headers incrementally: they may be
	incomplete as they come from the script (for example after a
	``sys.stdout.write ("Content-type: text/html"); sys.stdout.write
	("\n");'')
	(ApacheBuff_write): Raise an exception when a malformed header is
	found. In this way the interpreter stops and reports the error. 
	(exec_the_script): In PersistentMode, return SERVER_ERROR on all
	raised exception but SystemExit.
	(get_python_path): use r->pool, not r->connection->pool.
	(exec_the_script): likewise.
	(exec_the_script): write directly to stderr, not through
	log_reason(), when not in Persistent mode.
	(ApacheBuff_write): Update r->bytes_sent.

Tue Jun 25 15:29:58 1996  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/mod_pyapache.c (parse_headers): sync'ed with latest Apache's
	scan_script_header().
	(parse_headers): better check on malformed headers.

Tue Jun 25 11:59:30 1996  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/mod_pyapache.c (python_child): Use Apache's
	client_to_stdout() functionality for NPH scripts. This hopefully
	removes the NPH bug indicated by Dave Mitchell <davem@magnet.com>. 

Mon Jun 24 13:12:30 1996  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/mod_pyapache.c (initialize_python_environment): Corrected
	the setting of the argv, when no arguments are present.
	(python_child): Use an ApacheBuff for NPH scripts, instead of
	opening a new file descriptor on client->fd.
	(copy_client_result): close the script_out once sent to the
	client. 
	(child_execute_python_script): close script_in, once copied
	arguments to it.

Sun Jun 23 12:40:22 1996  Lele Gaifax  <lele@nautilus.eclipse.it>

	* manual/mod_pyapache.tex (subsection{Apache Module}): Added.

	* src/mod_pyapache.c (ApacheRequest_methods): Removed
	read_client_block method on ApacheRequest. 
	(ApacheRequest_getattr): Handle __doc__ attribute.
	(ApacheConnection_getattr): idem.
	(ApacheServer_getattr): idem.
	(ApacheTable_getattr): idem.
	(ApacheBuff_getattr): idem.

Fri Jun 21 17:32:26 1996  Lele Gaifax  <lele@nautilus.eclipse.it>

	* src/mod_pyapache.c (initialize_python_environment): moved here
	the call to error_log2stderr(): in this way the `verbosity' of the
	interpreter will go in the error log instead of to the console.

	(python_child): removed the call to error_log2stderr().

