Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
Checking mergeability… Don’t worry, you can still create the pull request.
This comparison is big! We’re only showing the most recent 250 commits
Commits on Jan 14, 2006
jgallacher Preparation for 3.2.6b. 0ace329
Commits on Jan 16, 2006
jgallacher Preparation for tagging 3.2.6 (final) b429ce6
Commits on Feb 01, 2006
nlehuen Added a Python 2.2 compatibility module. The test suite now runs succ…
…essfully on Python 2.2 under Windows 2000.
Commits on Feb 02, 2006
nlehuen Changed the mod_python.cache.FileCache.check() method so that it stat…
…() then open() the file, rather than open() it and fstat() it. Added a unit test to check whether the publisher cache is doing his job correctly.
nlehuen Reverted the Python 2.2 support hack ; I leave in place b…
…ecause it should be possible to use it with PythonImport.
nlehuen Bumped up version number. a696624
nlehuen We don't need no stinkin' enumerate. 1d58f16
jgallacher Fixed buffer resizing bug in _conn_read().
jgallacher Fixed connection handler seg fault bug.
Commits on Feb 03, 2006
jgallacher Disabled test_publisher_cache as it is problematic on mpm-prefork and
worker. See comments in test/ for more information.
nlehuen Use time.time() rather than time.clock() as its behavior is more cons…
…istent on all platforms.
jgallacher Prepartion for 3.2.7 packaging. af46e7f
jgallacher Updated the appendix to show what was fixed for 3.2.7. 84d5d84
Commits on Feb 10, 2006
jgallacher Added support for Apache 2.2. Ref MODPYTHON-78
Changed connobject makesockaddr to directly access the address port
rather than using apr_sockaddr_port_get, which was deprecated and removea
d in apr 1.x.

Removed APR_STATUS_IS_SUCCESS which is deprecated. Code which used this
macro will now just compare any return condition with APR_SUCCESS.

Added support to unit test to detect apache version.

Modified unit tests to accomodate changes to mod_auth in apache 2.2.
Mod_auth has been split into multiple modules. The mod_python unit test
will now use mod_auth_basic when apache 2.2 is detected.

An explicit value for KeepAliveTimeout is now set in the unit test when
apache 2.2 is detected.
jgallacher Bumped version strings. 71de420
jgallacher Fixed to work correctly with bash 3.1.
Commits on Feb 12, 2006
jgallacher Code cleanup. Changed C++ style comments to C style. 3351548
jgallacher Code cleanup.
Replaced repetitive code in requestobject.c/request_tp_traverse with
jgallacher Code cleanup. Replaced repetitive code in requestobject.c/request_tp_…


Bumped version strings.
jgallacher Code cleanup. Deleted some comment noise. c6d4a7d
Commits on Feb 13, 2006
jgallacher Small grammar fix. bab77d5
jgallacher Added "make check" Makefile rule for running the unit tests. 95aa837
Commits on Feb 15, 2006
nlehuen - Fixed the unit tests for apache.register_cleanup server.register_cl…
…eanup. There is not way it could have passed before, yet it did ???

- Corrected the documentation about those two functions, it was badly broken.
- Added a warning so that users don't try to pass a request object as the argument to the callable.
nlehuen Use more specific error messages in the error log to prevent test col…
Commits on Feb 16, 2006
jgallacher Corrected request.user doc - it is no longer read-only. 4229991
Commits on Feb 19, 2006
grahamd Support for third party C modules using simplified API for GIL. (MODP…
grahamd New req.is_https() and req.ssl_var_lookup() methods. (MODPYTHON-94) 4b58654
grahamd Fix test for req.get_basic_auth_pw(). It wasn't actually testing the
function at all.
grahamd New req.auth_name() and req.auth_type() methods. Also made req.ap_aut…

writable. (MODPYTHON-124)
Commits on Feb 20, 2006
grahamd New req.construct_url() method. Used to construct a fully qualified URI
string incorporating correct scheme, server and port. (MODPYTHON-132)
Commits on Feb 21, 2006
grahamd Made req.handler writable. (MODPYTHON-125) 6a62766
Commits on Feb 22, 2006
jgallacher Fixed license information. Some files have incorrect Apache License n…

Corrected these to show Apache License Version 2.0.
jgallacher Fixed unit test which failed as a result of the License change.
One of the unit tests depends on the first line in htdocs/
Since this line was changed when I updated the licsense, the test
started failing. Mea culpa.
Commits on Feb 23, 2006
grahamd Added req.register_input_filter(), req.register_output_filter(),
req.add_input_filter() and req.add_output_filter() to support dynamic
registration and chaining of filters to the active request. (MODPYTHON-103)
grahamd Correct displayed function names in error log messages. 81615dc
Commits on Feb 25, 2006
grahamd Filter no longer overwrites req.phase. (MODPYTHON-112) 4aefeaa
Commits on Feb 26, 2006
grahamd A mod_python.publisher __auth__() function nested inside another func…

will now execute in context of globals from module the function is contained
in and not in context of globals from mod_python.publisher. (MODPYTHON-43)
jgallacher Fixed copyright notice. 2d3b810
Commits on Mar 04, 2006
jgallacher Add stub for security section in docs.
jgallacher Fixed LaTeX syntax errors. 3c42a7d
jgallacher Added Security to table of contents. fa1a9b1
Commits on Mar 05, 2006
grahamd Contents of table object returned by req.server.get_config() wasn't h…

just the top level server configuration but was also errornously mixing in
some container specific onfiguration. (MODPYTHON-133)
grahamd Setting PythonDebug to Off, wasn't overriding On setting in parent sc…

grahamd Added new req.server.get_options() method. (MODPYTHON-137) ee34fe5
grahamd Changed util.redirect() to return DONE status instead of OK. (MODPYTH…
grahamd Make req.proxyreq and req.uri modifiable so that it is possible to tr…

proxy redirects for a request. (MODPYTHON-141)
jgallacher Ported sid validity check fix for MODPYTHON-135 from branches/3.2.x to
jgallacher Change chapter labels.
Added apache 2.2 and bash 3.1.x fixes to changes from 3.2.8 section.
Commits on Mar 06, 2006
jgallacher Fixed DbmSession unit test to not use the default location for the
dbm file. (MODPYTHON-119)
Commits on Mar 07, 2006
grahamd The req.no_cache and req.no_local_copy attributes are now writable.
grahamd The FilterDispatch callback should not flush the filter if it has alr…
…eady been

closed. (MODPYTHON-76)
grahamd When using mod_python.publisher, the __auth__() and __access__() func…

and the __auth_realm__ string can now be nested within a class method as a
well a normal function. (MODPYTHON-27)
Commits on Mar 10, 2006
grahamd Modified mod_python.publisher and mod_python.psp so they do not expli…

flush output after writing the content of the response back to the request
grahamd Fixed mod_python.publisher so it will not return a HTTP Bad Request
response when mod_auth is being used to provide Digest authentication.
grahamd The Py_Finalize() function was being called on child process shutdown…
…. This

was being done though from within the context of a signal handler, which is
generally unsafe and would cause the process to lock up. This function is
no longer called on child process shutdown. (MODPYTHON-109)
jgallacher Added test/Makefile rules for clean and distclean (MODPYTHON-139). e9433f0
Commits on Mar 11, 2006
jgallacher Added --with-mutex-dir configure option to make the mutex directory
configurable at compilation time (MODPYTHON-131).
jgallacher Added support for configuring the mutex directory and number of locks
at apache startup using PythonOption directives. The unit tests still need
to be refactored to take advantage of this new capability.
jgallacher Bumped version strings. d161a40
jgallacher Fixed unit tests to be compatible with the use of
PythonOption mod_python.mutex_directory. The unit tests can now
use a different mutex_directory, and there will not interfere with
a running apache instance. (MODPYTHON-131).
Commits on Mar 12, 2006
grahamd Support added for using Python in content being passed through "INCLU…

output filter, or as more commonly referred to server side include (SSI)
mechanism. (MODPYTHON-104)
Commits on Mar 15, 2006
grahamd Fix SSI suppport so that it compiles and works on Apache 2.2. Fix issue
in SSI where Python code still executed in false part of conditional.
Also remove calls to release interpreter being done prior to interpreter
having been acquired by SSI code in the first place. (MODPYTHON-104)
grahamd Use official means for determing when API changed for a specific feat…

namely the AP_MODULE_MAGIC_AT_LEAST macro. (MODPYTHON-104).
grahamd The apache.interpreter and apache.main_server attributes have been made
publically available. These were previously private and not part of the
public API. Bug also fixed in that the server reference wasn't always the
actual main server object. (MODPYTHON-144)
Commits on Mar 17, 2006
grahamd Allow a handler to preload data into SSI global data set for #python …
…tag prior

to INCLUDES output filter being executed to process response, by setting the
req.ssi_globals attribute to a dictionary. Also remove filter object explicitly
from global data set after each tag instances is executed in case it causes
issues with garbage collector since request object will reference global data
resulting a cycle. (MODPYTHON-104)
grahamd PythonImport directive now uses apache.import_module() to import modules
to avoid issues with modules being loaded multiple times. (MODPYTHON-113)
PythonImport directive now allows function within module to be optionally
specified where function is called after module has been successfully
imported. (MODPYTHON-118)
grahamd Fixed race conditions on setting sys.path when the PythonPath directi…
…ve is

being used as well as problems with infinite extension of path. (MODPYTHON-114)
Stopped directories being added to sys.path multiple times when PythonImport
and PythonPath directive used. (MODPYTHON-147)
Commits on Mar 18, 2006
grahamd SSI code specific to Apache 2.0 was incorrectly referencing the Apach…
…e 2.1+

Commits on Mar 19, 2006
grahamd Added missing Apache contants apache.PROXYREQ_RESPONSE and
apache.HTTP_UPGRADE_REQUIRED. Also added new constants for Apache magic
mime types and values for interpreting the req.connection.keepalive and
req.read_body members. (MODPYTHON-148)
grahamd Added the filetype attribute of the Apache finfo structure to the tuple
returned when accessing req.finfo. This value is accessed using
req.finfo[apache.FINFO_FILETYPE]. New constants apache.APR_NOFILE,
apache.APR_REG, apache.APR_DIR etc, have been added for comparing with the
filetype value. (MODPYTHON-128)
grahamd Forgot to document that req.canonical_filename was made writable in p…

changes. (MODPYTHON-128)
grahamd Added req.set_etag(), req.set_last_modified() and req.update_mtime()
functions as wrappers for similar functions provided by Apache C API.
Commits on Mar 20, 2006
grahamd Added new experimental module importer. New module importer does not run
by default but must be enabled explicitly. (MODPYTHON-143)
Commits on Mar 21, 2006
grahamd In a multithread MPM, the apache.init() function could be called
more than once for a specific interpreter instance whereas it should
only be called once. (MODPYTHON-150)
Commits on Mar 22, 2006
jgallacher FieldStorage efficiency improvement provided by
Mike Looijmans.  Adapted FieldStorage documentation examples
from Barry Pearce.
jgallacher Bumped version strings. 995ff46
Commits on Mar 24, 2006
grahamd Moved where python_filter() accesses per request Python config to aft…
…er the

request config object is acquired. Needed as way ap_internal_fast_redirect()
is used by Apache to implement DirectoryIndex was creating scenario where
per request config was null in parent request when accessed, causing a crash.
grahamd When python_filter couldn't find an actual mod_python filter handler …
…it was

returning DECLINED, but not releasing the interpreter. By rights this
scenario should never have happened, but issues caused by use of the
ap_internal_fast_redirect() function by Apache to implement DirectoryIndex
directive was causing it, as details of filters weren't being copied from
sub request object to parent. End result was further requests against that
interpreter in that process would hang as lock for interpreter couldn't be
acquired. Would also cause shutdown to hang with child processes needing to
be killed off forcibly by parent Apache process. (MODPYTHON-146)
Commits on Mar 25, 2006
grahamd The python_filter() function would only be called when Python*Filter …
…is used

to register a filter and then Set*Filter or Add*Filter is used to trigger
the execution of that filter. Alternatively, it will be called when
req.register_*_filter() and req.add_*_filter() is used. In both cases
python_filter() should always be able to find a registered filter and if it
can't it is indicative of some sort of internal problem with Apache/mod_python.
This is the case with how ap_internal_fast_redirect() is used to implement
the DirectoryIndex directive with details of the handler for a mod_python
filter not being transfered from sub request to parent request. As such,
when a registered filter cannot be found it is really an error and so it
shouldn't be returning DECLINED but INTERNAL_SERVER_ERROR. Thus change code
to return an error and also log an explicit message indicating that a
registered filter couldn't be found. Note that even even if it were left to
return DECLINED in this case, Apache itself then in turn generates an
INTERNAL_SERVER_ERROR as no filter has properly executed, so the result is
no different, but having it return the error and log the message makes it
more explicit what is going on and the error log will indicate what the
problem is whereas Apache doesn't indicate what the problem is when it
generates the error making it hard for a user to work out what is going on.
Commits on Mar 26, 2006
grahamd Debug error page returned to client when an exception in a handler
occurred wasn't escaping special HTML characters in the traceback or
the details of the exception. (MODPYTHON-151)
jgallacher Fixed indentation in example code for publisher doc. f5761fb
jgallacher Fixed more indentation issues in Doc/modpython6.tex code examples. 09bd9d0
Commits on Mar 28, 2006
grahamd Can't avoid doing stat on file if module marked as dirty from previously
failed import as mtime will never be updated and it will reload on every
subsequent request. Code also wasn't distinguishing empty dictionary from
None properly, meaning that per request module cache wasn't being used,
resulting in potential loss of efficiency in certain cases and danger of
loading multiple instances of same module in context of one request if file
on disk change at that instance in time. (MODPYTHON-143)
Commits on Mar 31, 2006
nlehuen Set svn-keywords so that the header gets updated. 71ce62c
Commits on Apr 02, 2006
grahamd Fixes to test suite so it will work on virtual hosting environments
where localhost doesn't resolve to but the actual IP address
of the host. (MODPYTHON-120) (MODPYTHON-121)
grahamd Note made in session documentation that a save is required to avoid
session timeouts. (MODPYTHON-111)
grahamd Added req.discard_request_body() function as wrapper for similar func…

provided by Apache C API. The function tests for and reads any message body
in the request, simply discarding whatever it receives. (MODPYTHON-153)
Commits on Apr 07, 2006
nd svn:eol-style = native cb37ac5
Commits on Apr 09, 2006
grahamd The PythonImport directive makes use of the handler list data structure
even though it specifically is for a different purpose. The handler list
data structure needs to be changed a bit in order to support changes
required to address MODPYTHON-63 and MODPYTHON-126. These changes may
make it unusable in the way that the PythonImport directive was using it,
or at least it will not be a good match. The PythonImport directive has
therefore been modified to use a standard Apache table object thereby
allowing arbitrary changes to the handler list data structure to be made as

Note that although the current Apache table implementation probably results
in module imports occuring in the order they appear in the Apache
configuration file, if how it is implemented is changed, this may no longer
be the case. This is not seen as an issue as the documentation for the
PythonImport directive does not give any guarantees about ordering of
imports within the context of a specific interpreter and it would be bad
practice for modules to rely on mod_python importing them in a specific
order. If there are ordering requirements, it should be dealt with internal
to the module being imported so that it is self contained.
grahamd A variable of type hl_entry was being used to copy pointer values of …

py_handler. Because of void* casting the code still worked fine, but the
mixing of pointer types could make someone looking at the code think
input/output filter lists held a data type different to what they actually
grahamd Cleanup handler was calling free() on memory which was allocated from…
… Apache

memory pool. The code was on an error handling path which would never normally
be executed and so wasn't causing any problems.
grahamd Fixed various constness and other pointer typing issues to eliminate …

generated by compiler.
Commits on Apr 10, 2006
grahamd Wrong interpreter name used for fixup handler phase and earlier, when
PythonInterpPerDirectory was enabled and request was against a directory
but client didn't provide the trailing slash. (MODPYTHON-157)
grahamd Added additional debugging and logging output for where mod_python ca…

initialise itself properly due to Python or mod_python version mismatches
or missing Python module code files. (MODPYTHON-158)
grahamd Added the value of the "__file__" attribute from "mod_python" module to
the error log output when there are problems executing "apache.init()" to
construct callback object. (MODPYTHON-158)
Commits on Apr 12, 2006
grahamd Minor documentation fix related to MODPYTHON-145. 35fa50b
Commits on Apr 13, 2006
grahamd Restructure req_requires test to avoid need for AuthBasicAuthoritative
directive just for Apache 2.2. Also introduce authz phase to req_auth_type
test to eliminate possibility that not having it when Requires directive
is used causes complaints from Apache 2.2.
Commits on Apr 16, 2006
grahamd Using PythonInterpPerDirective when setting content handler to
run dynamically with req.add_handler() would cause Apache to
crash. (MODPYTHON-160)
grahamd When Python*Handler or Python*Filter directive is used inside of a Files
directive container, the handler/filter directory value will now correctly
resolve to the directory corresponding to any parent Directory directive or
the location of the .htaccess file the Files directive is contained in.

The patch also lays the ground work for being able to support Directory
directive with glob style wildcards or Directory/DirectoryMatch directive
with a regular expression. (MODPYTHON-63)
Commits on Apr 18, 2006
grahamd Need to canonicalize directory path so as to normalize on POSIX style…
… directory

naming conventions, else backslashes on Win32 propogate through. (MODPYTHON-126)
Commits on Apr 20, 2006
grahamd Debian backported ap_regex_t to Apache 2.0 and thus made official ver…

checking break for this feature. Use explicit check for AP_REG_EXTENDED
in addition to version check. (MODPYTHON-63) (MODPYTHON-126)
Commits on Apr 21, 2006
grahamd PythonHandlerModule was not setting up registration of the
PythonFixupHandler or PythonAuthenHandler. For the latter this meant that
using Require directive with PythonHandlerModule would cause a 500 error
and complaint in error log about "No groups file". (MODPYTHON-166)
Commits on Apr 23, 2006
grahamd Calling the req.auth_type() and req.auth_name() functions when the
directives hadn't been used to set the corresponding value would cause
Apache to crash due to a null pointer being used to construct a Python
string object. (MODPYTHON-124)
grahamd Remove the "~/" shortcut for referencing modules by path stored in
directory specified by the Python*Handler directive, when using
apache.import_module() and when specifying the handler as option to the
directive. In the case of the option to the directive itself, the "./" and
"../" shorcuts can be used instead. (MODPYTHON-143)
grahamd Error path in SSI code when interpreter could not be obtained was trying
to wrongly release the interpreter. (MODPYTHON-104)
Commits on Apr 24, 2006
grahamd When fix for MODPYTHON-134 was made resulting in boolean mod_python c…

values now being present as "0" value entry, rather than being absent, the
check in new module importer for PythonEnablePdb wasn't updated to match
the new scheme. Thus, setting PythonEnablePdb to Off would actually result
in it being enabled when it shouldn't have been.
grahamd The PythonEnablePdb configuration option will now be ignored if Apache
hasn't been started up in single process mode. (MODPYTHON-90)

If running Apache in single process mode with PDB enabled and the "quit"
command is used to exit that debug session, an exception indicating that
the PDB session has been aborted is raised rather than None being returned
with a subsequent error complaining about the handler returning an invalid
value. (MODPYTHON-91)

Both these changes were back ported from new importer code to the old
importer code.
grahamd When PythonDebug was On and and exception occurred, the response to the
client had a status of 200 when it really should have been a 500 error
status indicating that an internal error occurred. A 500 error status was
correctly being returned when PythonDebug was Off. (MODPYTHON-167)
grahamd Force an exception when handler evaluates to something other than Non…
…e but

is otherwise not callable. Previously an exception would not be generated
if the handler evaluated to False. (MODPYTHON-101)
Commits on Apr 25, 2006
grahamd Don't have new importer look by default in handler root directory unless
file the import is being done from is in that directory. Looking in the
handler root directory can be enabled if needed for backward compatibility.
When enabled, PythonPath being set does not prevent the lookup occuring.
Commits on Apr 27, 2006
grahamd Added support for cross domain session objects. (MODPYTHON-149) f56ede9
Commits on Apr 28, 2006
grahamd Dictionary from module is a borrowd reference and thus reference coun…
…t should

not be decremented. (MODPYTHON-158)
Commits on Apr 29, 2006
jgallacher Fixed psp_parser error when CR is used as a line terminator in psp code.
This may occur with some older editors such as GoLive on Mac OS X.
jgallacher Bumped version strings. 121e4eb
Commits on Apr 30, 2006
grahamd When in a sub request, when a request is the result of an internal
redirect, or when when returning from such a request, the req.main,
req.prev and members now correctly return a reference to the
original Python request object wrapper first created for the specific
request_rec instance rather than creating a new distinct Python request
object. This means that any data added explicitly to a request object can
be passed between such requests. (MODPYTHON-152)
grahamd Added support to cookies for "httponly" attribute, an extension origi…

created by Microsoft, but now getting more widespread use in the battle
against cross site-scripting attacks. (MODPYTHON-108)
Commits on May 01, 2006
grahamd Ensure that when using the new importer, that imports from SSI code l…
…ook in

same directory as the file being expanded or location that request matches
as appropriate. (MODPYTHON-156)
Commits on May 03, 2006
grahamd When using stacked handlers and a SERVER_RETURN exception was used to
return an OK status for that handler, any following handlers weren't being
run if appropriate for the phase. (MODPYTHON-100)

The change was backported from new module importer which already included
the fix, to existing importer.
Commits on May 06, 2006
grahamd When specifying multiple handlers for phases other than the content p…

as defined by PythonHandler, the status returned by each handler is now
treated the same as how Apache would treat the status if the handler was
registered using the low level C API. What this means is that whereas
previously stacked handlers of any phase would in turn be executed as long
as they returned apache.OK, this is no longer the case and now only occurs
for PythonHandler. What happens for other phases is dependent on the phase,
but in all cases, a handler returning apache.DECLINED no longer causes the
execution of subsequent handlers for the phase to be skipped. Instead, it
will move to the next of the stacked handlers. In the case of
PythonTransHandler, PythonAuthenHandler, PythonAuthzHandler and
PythonTypeHandler, as soon as apache.OK is returned, subsequent handlers
for the phase will be skipped, as the result indicates that any processing
pertinent to that phase has been completed. For other phases, stacked
handlers will continue to be executed if apache.OK is returned as well as
when apache.DECLINED is returned. (MODPYTHON-129)
Commits on May 07, 2006
grahamd Directory argument supplied to req.add_handler() is canonicalized and a
trailing slash added automatically. This is needed to ensure that the
directory is always in POSIX path style as used by Apache and that
convention where directories associated with directives always have
trailing slash is adhered to. If this is not done, a different interpreter
can be chosen to that expected when the PythonInterpPerDirective is used.
The same sort of modification was also made for the directory argument
of the req.register_input_filter() and req.register_output_filter()
functions. (MODPYTHON-161) (MODPYTHON-103)
Commits on May 08, 2006
grahamd Eliminated crash when dynamically registered filters used in conjunct…
…ion with

PythonInterpPerDirective. (MODPYTHON-103)
grahamd Eliminate Apache crash after a Python exception in SSI code. Problem …
…was that

filter.disable() was being called, but that expects that f->ctx is an instance
of python_filter_ctx when for SSI it is an include_ctx. As a result it was
overwriting data it shouldn't have. The changes also stop any details of the
exception being written back to the client even if PythonDebug is On as for
SSI it should possibly only ever be logged and errors should not be rendered
in pages. (MODPYTHON-104)
Commits on May 09, 2006
grahamd Python code in SSI files can have CRLF line endings on Win32 platform…
…. These

need to be eliminated else Python raises an exception. (MODPYTHON-104)
grahamd Old variable definition not removed and was hiding function parameter…
…. If

variable definition attained a non null value, code could also crash. In
worst case, if neither handler or filter specified, result would have been
value of PythonInterpPerDirective setting. The latter shouldn't in practice
occur but cater for it anyway. (MODPYTHON-103)
Commits on May 20, 2006
jgallacher Refactored to fix egregious indent problems. There was a mixture
of 3 and 4 space indents splattered throughout the file. Ugh.
jgallacher Bumped version strings. bc0b0f7
jgallacher Fixed some more indentation problems. Everything in lib/python/mod_py…

should now be correctly indented with 4 spaces.
Commits on May 22, 2006
grahamd Make phase status test more resiliant to strange httpd build
configurations. On some platforms authz handler phase was being called when
it wasn't expected that it would be called.
Commits on Jun 23, 2006
jgallacher Fixed DbmSession file creation such that the db file will
be created with mode 0640. (MODPYTHON-173)
jgallacher Updated changes section of docs. (MODPYTHON-173) a06a3ef
jgallacher The original change to fix the symlink issue for req.sendfile was cau…

problems on Win32, plus needs to be changed to work with a APR 1.2.7
change required for subversion to work. (MODPYTHON-84)
Bug reported and patch provided by Sergey A. Lipnevich.
jgallacher Changed minimum apache version to 2.0.47 in docs. ece476c
Commits on Jul 09, 2006
nlehuen Fix for #MODPYTHON-172 and other memory leaks in req.readlines and cf…
nlehuen Added reference to #MODPYTHON-172 in the Appendix C. d0e761c
nlehuen Fix + unit test for #MODPYTHON-179. b60d835
nlehuen Ooops, forgotten again. Added a reference to #MODPYTHON-179 in the Ap…
…pendix C.
nlehuen Added instructions on how to make a debug build on Win32. 231b455
nlehuen This slipped through my check in review. Graham's importer was enable…
…d by default. Reverting back to the normal.
jgallacher Bumped version strings. c37aee3
Commits on Jul 26, 2006
grahamd Added 'mp' qualifier into the names of the special mod_python variabl…
…es put

into every module loaded by the new module importer. Changes are __info__
to __mp_info__, __clone__ to __mp_clone__ and __purge__ to __mp_purge__.
Code has been restructured so that module specific search path additions
can now be appended to module variable called __mp_path__ instead of
__info__.path. (MODPYTHON-143)
grahamd When using mod_python.psp, if the PSP file which is the target of the…
… request

doesn't actually exist, an apache.HTTP_NOT_FOUND server error is now returned
to the client rather than raising a ValueError exception which results in a
500 internal server error. Note that if using SetHandler and the request is
against the directory and no DirectoryIndex directive is specified which
lists a valid PSP index file, then the same apache.HTTP_NOT_FOUND server
error is returned to the client. (MODPYTHON-178)
Commits on Jul 29, 2006
grahamd Added support such that when using req.register_input_filter(),
req.register_output_filter() and req.add_handler() it is now possible to
supply directly a callable object to be used as well as the existing
string reference identifying the module/function to be called. (MODPYTHON-164)
grahamd (MODPYTHON-175) Fixed problem whereby a main PSP page and an error page
triggered from that page both accessing the session object would cause a

(MODPYTHON-176) Fixed issue whereby PSP code would unlock session object
which it had inherited from the caller meaning caller could no longer use
it safely. PSP code will now only unlock session if it created it in the
first place.
Commits on Jul 30, 2006
grahamd MODPYTHON-38) Fixed issue when using PSP pages in conjunction with
publisher handler or where a PSP error page was being triggered, that form
parameters coming from content of a POST request weren't available or only
available using a workaround. Specifically, the PSP page will now use any
FieldStorage object instance cached as req.form left there by preceding
grahamd (MODPYTHON-155) Modifications to handler and filter lists so that
references can be maintained back to parent handler of a handler/filter
which was registered dynamically. This is necessary within the scheme of
how the new module importer works. Specifically, where a directory isn't
specified when adding a handler or registering a filter, the directory
associated with the parent up the chain has to be used instead. In the old
importer it was relying on fact that directory of parent had already been
added to the Python sys.path, although this didn't actually work reliably.
The new module importer doesn't add directories to sys.path and so the need
to properly work out directory associated with a parent so that it can be
used when required.
Commits on Aug 01, 2006
grahamd (MODPYTHON-181) Fixed memory leak when mod_python handlers are defined
for more than one phase at the same time.
Commits on Aug 03, 2006
grahamd (MODPYTHON-155) Improve memory efficiency related to req.add_handler()
and construction of handler list objects.
(MODPYTHON-181) Fix problems with req.add_handler() introduced when memory
leaks were eliminated related to handler list object.
Commits on Aug 05, 2006
grahamd (MODPYTHON-63) Fixes to code previously set down for handling <Direct…
…ory ~>

and <DirectoryMatch> as it wasn't decoding configuration correctly and in
case of <DirectoryMatch> could cause Apache to crash.
Commits on Aug 08, 2006
grahamd (MODPYTHON-84) Further fix related to symlinks in req.sendfile() not …

in changes list of documentation.
Commits on Aug 13, 2006
grahamd (MODPYTHON-171) When a pathname is assigned to req.filename, the path…

will be normalised with the result being a POSIX style pathname as required
by Apache.
Commits on Aug 14, 2006
grahamd When handler directives are used within Directory or DirectoryMatch
directives where wildcards or regular expressions are used, the handler
directory will now be correctly set to the shortest directory matched by
the directory pattern, whereas previously it was being left as the
pattern which meant that modules located with that directory weren't
able to be loaded.
jgallacher Credit where credit is due. Added information on Aaron Watters early
contribution to mod_python.
Commits on Aug 15, 2006
jgallacher Reorganized the "Changes from ..." sections in appendexc.tex. b06d5d8
jgallacher Fixed memory leak in req.readline() (MODPYTHON-182) ee08bf3
jgallacher Bumped version strings. 04d6111
jgallacher Fixed segfault in psp.parsestring(src) where src = "".
Commits on Aug 20, 2006
grahamd (MODPYTHON-143) Made the new importer the default. Now have to use the
PythonOption 'mod_python.legacy.importer' to specify names of interpreters
or '*' for all interpreters, if you want to use old importer. Now possible
to set PythonOption 'mod_python.importer.path' to specify a search path
for modules. Ie., like PythonPath, but only for the new importer. Feature
whereby possible to use '~/' as prefix to explicit module name to the
apache.import_module() function now reinstated. This allows a way of importing
module easily from directory for which the handler directive was specified.
The PythonOption 'mod_python.import.search_handler_root' has been dropped
as same thing can be achieved using 'mod_python.importer.path' option or
by explicit importation from handler root. Added two new functions
apache.modules_graph() and apache.request_modules_graph() which return as
a string a DOT graph definition of relationship between all modules imported
or just those specific to the current request. These functions are only
present when new importer is being used.
grahamd (MODPYTHON-165) Exported functions from mod_python module to be used in
other third party modules for Apache. The purpose of these functions is to
allow those other modules to access the mechanics of how mod_python creates
interpreters, thereby allowing other modules to also embed Python and for
there not to be a conflict with mod_python.
grahamd Borrowed references incorrectly having their reference counts decreme…

in debugging code invoked when mod_python couldn't start up properly.
Commits on Aug 24, 2006
grahamd (MODPYTHON-128) Changed req.finfo to be an object where fields of und…

fields of apr_finfo_t structure are accessed as object attributes. Tuple
style access is still maintained for backward compatability. The req.finfo
attribute is now also writable and can be assigned with the result of calling
new functions apache.stat() and apache.lstat().
Commits on Aug 27, 2006
grahamd (MODPYTHON-184) Fix memory leak in apache.make_table(). This was used by
util.FieldStorage class so affected all code using forms.
grahamd (MODPYTHON-184) Documentation on fix to memory leak in apache.make_ta…
Commits on Oct 02, 2006
grahamd (MODPYTHON-171) Reverted changes which resulted in automatic normalis…

of path assigned to req.filename. This is because req.filename is sometimes
used to pass values which isn't strictly a path between handlers. For example
when setting up proxy-server module. Doing normalisation in this case would
thus cause these handlers to fail as extraneous leading slash could be
added to req.filename.
grahamd (MODPYTHON-159) Fix FieldStorage class so that it can handle multiline
grahamd (MODPYTHON-187) Table objects could crash in various ways when the va…
…lue of

an item was NULL. This could occur for SCRIPT_FILENAME when the
req.subprocess_env table was accessed in the post read request handler
grahamd (MODPYTHON-189) Fixed representation returned by calling repr() on a …

object. Note this was committed as part of change for MODPYTHON-187.
grahamd Thread locks not being released when fatal error condition occurs. Re…

duplicate method listing.
Commits on Oct 03, 2006
jgallacher Added missing latex directive \item 1409492
Commits on Oct 08, 2006
grahamd (MODPYTHON-109) Amend comment relating to disabling of Python cleanup on
grahamd (MODPYTHON-180) Publisher would wrongly output a warning about nothin…
…g to

publish if req.write() or req.sendfile() used and data not flushed, and
then published function returned None.
Commits on Oct 14, 2006
jgallacher Added reserved PythonOption keywords to Docs. 6f709db
Commits on Oct 20, 2006
jgallacher (MODPYTHON-190) Added comments for lines of code which will require a…

for Python 2.5 / 64-bit support. These were the lines that were identified
by the script.
jgallacher (MODPYTHON-59) Excised the code stub for the req.get_session() functi…

The general idea still has merit, but the proposed solution was wrong.
This issue should be closed. It can always be resurrected in another
form later if desired.
jgallacher (MODPYTHON-119) test_psp_error was automagically creating a dbm file …

file, but the configuration for the test did not include a PythonOption
for the session_directory. Thus the mp_sess.dbm file was being created
in the default location. Running the tests could interfer with another 
Apache mod_python instance running on the same host.
Commits on Oct 21, 2006
grahamd (MODPYTHON-194) Fixed potential memory leak when thread state objects…
… weren't

cleared before they were being deleted.
grahamd (MODPYTHON-143) Ensure that details of exceptions that occur in __mp_…

and __mp_purge__() are logged.
grahamd (MODPYTHON-143) Include additional information about process, interpr…
…eter etc

in the details logged and returned for an exception occuring in a handler.
Commits on Oct 22, 2006
grahamd (MODPYTHON-128) Removed apache.lstat() due to apr_lstat() having being
deprecated in Apache 2.2. Similar outcome can be had by supplying
APR_FINFO_LINK flag with arguments to apache.stat().
Commits on Oct 24, 2006
grahamd (MODPYTHON-196) Added log_error() methods to server and connection ob…

Also removed some unused variables which were causing compiler warnings.
grahamd (MODPYTHON-193) Added new req.hlist.location attribute so that value …
…to a

Location/LocationMatch directive can be determined. Also fixed crash when
req.hlist is accessed from inside a filter and do some restructuring of how
errors are logged and displayed back to browser.
Commits on Oct 26, 2006
grahamd (MODPYTHON-93) Fix up issues whereby quick lookup table onto list of …

fields isn't update when add_field() is used after first time that a lookup
of table is performed. The changes also allow direct changes to the list of
fields to be made with the lookup table being invalidated so that it will
be rebuilt the next time it is required.
Commits on Oct 27, 2006
grahamd (MODPYTHON-93) Restored a level of backward compatibility for third p…

packages which create instances of the Field class directly and insert them
direct into the list of form fields. This should mean that older versions
of Trac will still work.
grahamd (MODPYTHON-93) Logic check on when to trigger backwards compatibility…
… mode

for Field class was wrong way around.
grahamd Eliminate those pesky tab characters from Python code. 638517d
grahamd Fix cut and paste mistake that duplicated copyright notice. 30632bb
grahamd (MODPYTHON-93) Update documentation to list public interface of Field…
grahamd Note about using AuthAuthoritative and AuthBasicAuthoritative directi…
grahamd (MODPYTHON-127) Updated internal PythonOption setting names to all use a
'mod_python'. prefix. The old names are still supported for backward
grahamd (MODPYTHON-104) Contributed personal article on using Python code wit…
…h SSI

under mod_python. The original article was sourced from
grahamd Add note about using apache.DONE in non response phase handlers when …

to send a complete response and terminate processing.
grahamd (MODPYTHON-93) No need to access keys of dictionary to determine len(…
…), just

apply it to dictionary itself.
Commits on Oct 28, 2006
grahamd (MODPYTHON-143) Dump out information about modules touched by a reque…
…st when

an exception occurs in the importing of the modules or in executing the
handler and the exception isn't caught and is resulting in an internal
server error response.
grahamd (MODPYTHON-143) Can't set generation to zero prior to import as that …

dependency checks from working properly. The modification time is already
set back to zero on failed import which is what should have been checked
to indicate failed import.
grahamd (MODPYTHON-143) When cache is frozen or autoreload is disabled and a …

had previously failed to import, still need to ensure that an attempt is
made to reload it even though autoreload is now turned off. This may still
result in inconsistances with multiple instances of a module loaded. Short
story is that turning autoreloading off when modules haven't all been loaded
successfully in the first place is not good.
grahamd (MODPYTHON-143) Use a separate flag in the cache to indicate that a m…

must be reloaded on next access. This is instead of setting modification
time back to zero. This works out to be better as still can interogate the
modification time for debugging purposes.
Commits on Oct 29, 2006
grahamd (MODPYTHON-93) Added clear(), __delitem__() and __setitem__() methods…
…. The

__setitem__() method is an alias for add_field() and thus is additative
unlike a traditional dictionary.
grahamd (MODPYTHON-198) Fixed code supporting nested auth/access/realm detail…
…s inside

of functions in mod_python.publisher that was broken by Python 2.5.
grahamd Add link to my personal articles on mod_python into installation section
of documentation.
grahamd (MODPYTHON-93) The __delitem__() wasn't throwing a KeyError exception…
… when

the field name didn't exist.
grahamd (MODPYTHON-93) Missing __iter__() method to support 'for k in form'. 6727925
grahamd (MODPYTHON-93) Missing an appropriate __repr__() method as well on
FieldStorage class.
grahamd (MODPYTHON-143) Allow '~/' shortcut to be used in paths listed in the
'mod_python.importer.path' option. This means that paths can be specified
with respect to handler root rather than using absolute paths in Apache
configuration files.
Commits on Oct 30, 2006
grahamd (MODPYTHON-143) Fix module cache debug output whereby it dies when no
modules in per request cache. Also update output so it lists children as
paths instead of magic module name. Also distinguish friends from children,
friends being modules that were imported as part of the execution of the
request handler and not module import and therefore aren't included in
dependency checks to determine if module should be reloaded.
grahamd (MODPYTHON-143) Cleanup code formatting debug output for children and…
… friends.
Commits on Nov 03, 2006
grahamd The request object add_handler() function should allow None to be sup…

as the optional path argument and have it be interpreted as if the argument
was never supplied in the first place.
Commits on Nov 04, 2006
jgallacher Reorganized the changes section of appendix in prepartion for 3.3 rel…
jgallacher Fixed conn_log_cerror for apache < 2.0.55 (ie AP_MAGIC less than 2002…

This function falls back to ap_log_error for earlier apache versions,
but was passing conn->server instead of conn->base_server as an argument.
(There is no conn_rec->server element).
jgallacher Bump version strings. 7b9780e
Commits on Nov 05, 2006
grahamd (MODPYTHON-125) When assigning to req.handler, should allow it to be set
to None to reset it.
jgallacher Remove superfluous connobject server attribute. 5924234
jgallacher Added httpd config section to PSP Handler for use with .psp_. ba7b15e
Commits on Nov 07, 2006
grahamd (MODPYTHON-191) Session class will no longer accept a normal cookie if a
signed cookie was expected.
(MODPYTHON-200) Fixed problem whereby signed and marshalled cookies could
not be used at the same time. When expecting marshalled cookie, any signed,
but not marshalled cookies will be returned as normal cookies.
grahamd (MODPYTHON-143) Minimal documentation on some, but not all, changes t…
…o the

apache.import_module() function. Also corrections to documentation of
request objects functions for registering handlers and filters.
Commits on Nov 09, 2006
grahamd (MODPYTHON-195) Fix potential Win32 resource leaks in parent Apache p…

when process restarts occur.
jgallacher Fixed regession for MODPYTHON-119 in tests. One of the unittests was …

when PythonOption namespace changes were implemented.
jgallacher Fixed a couple of PythonOption namespace errors in the docs. 3627949
jgallacher Added the mod_python version to the deprecated notes for PythonOption. 7e0b6eb
Commits on Nov 10, 2006
grahamd (MODPYTHON-143) Added entry to list of changes for implementation of new
module importer.
Commits on Nov 13, 2006
grahamd Need to normalise paths in sys.path for PythonImport test case as sys…

is extended with document root which follows Apache forward slash convention
and not operating system backward slash convention when on Windows.
grahamd WinZIP on Windows boxes ignores empty directories in tar files when e…

them. This causes test case to fail as 'test/htdocs/subdir' will not exist.
Put a dummy file in the directory so that WinZIP has something to extract.
Commits on Nov 14, 2006
grahamd Attempt to auto detect when Apache uses APR 1.0 and link to those lib…

instead of older libraries when on Windows.
Commits on Nov 16, 2006
grahamd Need to be looking for link library and not dll when determining if A…
…PR 1

is present on Windows.
Commits on Nov 19, 2006
grahamd The attribute req.used_path_info is now modifiable and can be set from
within handlers. This is equivalent to having used the AcceptPathInfo
grahamd (MODPYTHON-207) The attribute req.args is now modifiable and can be set
from within handlers.
Commits on Nov 22, 2006
grahamd (MODPYTHON-129) Changed how return status of stacked handlers registered
against PythonHandler phase are interpreted. Subsequent stacked content
handlers are now executed when apache.DECLINED is returned as well as when
apache.OK is returned.
grahamd (MODPYTHON-93) Made assignment using the subscript operator against the
FieldStorage class act like a dictionary. In other words, any existing values
against a field are replaced with a single value rather than an additional
value being added against the field.
Commits on Nov 23, 2006
grahamd (MODPYTHON-128) The apache.stat() function, which is a wrapper for the
apr_stat() function, should still return a valid finfoobject when the
target of the apr_stat() call does not exist. This is instead of raising
an exception. This is necessary as otherwise there is no way of replacing
req.finfo with a finfoobject where req.finfo.filetype is APR_NOFILE. An
exception will only be raised now if a truly unexpected problem arises.
Callers of apache.stat() need to check finfo.filetype for APR_NOFILE if
they need to know if target existed or not.
grahamd Updated documentation of the req.meets_condition() member function to…
… show

req.update_mtime() and req.set_last_modified() in example.
Commits on Dec 02, 2006
grahamd (MODPYTHON-143) Have the handler root fallback to be the document roo…
…t when

handler directives are used in Location directive or in root context of
VirtualHost or actual server. This handler root is what is used as the
first place to look for a module when using apache.import_module() or when
it is necessary to expand a path prefixed by '~/'.
jgallacher Added link to the mod_python wiki CategorySecurity to the security se…

of the Docs. Security documentation will be done in the wiki rather than
in the source distribution docs. (MODPYTHON-19)
Commits on Dec 03, 2006
grahamd Have documentation about directives refer to apache.import_module() w…

grahamd (MODPYTHON-170) Added req._request_rec, server._server_rec and
conn._conn_rec semi private members for getting accessing to underlying
Apache struct as a Python CObject. These can be used for use in
implementing SWIG bindings for lower level APIs of Apache. These members
should be regarded as experimental and there are no guarantees that they
will remain present in this specific form in the future.
grahamd Progressive documentation updates for the apache.import_module() func…
grahamd (MODPYTHON-143) Allow just '~' to be used as a directory in the module
importer search path to refer to the handler root directory.
grahamd Further updates to documentation for the apache.import_module() funct…
grahamd Further documentation for the apache.import_module() function. a769c9f
grahamd More documentation about apache.import_module(), specifically, how to…
… enable

the old importer.
jgallacher Fixed some typos. 848ab4f
jgallacher Fixed the LaTeX tilde character problems in the Docs.
Fixed a broken html link (which contained a tilde).
Added some notes on LaTeX tilde handling to Doc/README so we don't forget
how to do this in the future.
Commits on Dec 04, 2006
grahamd Update notes in change log in respect of companion functions needed t…
…o use

grahamd Updates to documentation for apache.import_module(). b008873
Commits on Dec 06, 2006
grahamd Minor tweaks to apache.import_module() documentation. d7e2852
Commits on Dec 09, 2006
jgallacher Preparation for tagging 3.3.0b.
Bumped version strings.
Changed prerequisites to python 2.3.4 and apache 2.0.54.
jgallacher Synced NEWS file with branches/3.2.x 0b49ea0
Commits on Dec 30, 2006
jgallacher Small grammar fix in docs. d68c6b2
Commits on Jan 29, 2007
jgallacher Bumped version strings in preparation for 3.3.1 release. 098c508
Commits on Mar 29, 2007
jgallacher Added links in Request member docs to server object and connection ob…
jgallacher Documentation housecleaing. Added "Changes from Version 3.3.1" to App…
Commits on Jul 29, 2007
nlehuen All this stuff about building an uninstall log is not required. The f…
…ile_created() function takes care of uninstalling files at removal.
Commits on Nov 09, 2007
jgallacher (MODPYTHON-243) Fixed format string error. b019041