Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

...
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.
b8cba8e
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.
47ee5eb
nlehuen Reverted the Python 2.2 support hack ; I leave python22.py in place b…
…ecause it should be possible to use it with PythonImport.
e10ca08
nlehuen Bumped up version number. a696624
nlehuen We don't need no stinkin' enumerate. 1d58f16
jgallacher Fixed buffer resizing bug in _conn_read().
Ref MODPYTHON-102
e0bb420
jgallacher Fixed connection handler seg fault bug.
Ref MODPYTHON-102
f0a5e8b
Commits on Feb 03, 2006
jgallacher Disabled test_publisher_cache as it is problematic on mpm-prefork and
worker. See comments in test/test.py for more information.
1041a2a
nlehuen Use time.time() rather than time.clock() as its behavior is more cons…
…istent on all platforms.
0a51bd7
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.
63bc559
jgallacher Bumped version strings. 71de420
jgallacher Fixed configure.in to work correctly with bash 3.1.
Ref MODPYTHON-122
1b58ad7
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
VISIT_REQUEST_MEMBER macro.
2cb6803
jgallacher Code cleanup. Replaced repetitive code in requestobject.c/request_tp_…
…clear

with CLEAR_REQUEST_MEMBER macro.

Bumped version strings.
c3467e8
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.
2d9aca9
nlehuen Use more specific error messages in the error log to prevent test col…
…lisions.
b20de2b
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…
…YTHON-77)
d8c9ac2
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.
5cc1ada
grahamd New req.auth_name() and req.auth_type() methods. Also made req.ap_aut…
…h_type

writable. (MODPYTHON-124)
35befb6
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)
f574ffe
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…
…otice.

Corrected these to show Apache License Version 2.0.
63cadcd
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/tests.py.
Since this line was changed when I updated the licsense, the test
started failing. Mea culpa.
b06bf85
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)
284de78
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…
…tion

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)
3e07cbd
jgallacher Fixed copyright notice. 2d3b810
Commits on Mar 04, 2006
jgallacher Add stub for security section in docs.
Ref MODPYTHON-19
1f08f38
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…
…olding

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

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

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

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

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

flush output after writing the content of the response back to the request
object.
212b3ad
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.
(MODPYTHON-47)
7e433af
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)
110b256
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).
c951a9a
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.
Ref MODPYTHON-131, MODPYTHON-145
a81fa2f
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).
9b18a53
Commits on Mar 12, 2006
grahamd Support added for using Python in content being passed through "INCLU…
…DES"

output filter, or as more commonly referred to server side include (SSI)
mechanism. (MODPYTHON-104)
180c479
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)
83574e7
grahamd Use official means for determing when API changed for a specific feat…
…ure,

namely the AP_MODULE_MAGIC_AT_LEAST macro. (MODPYTHON-104).
3aa4c11
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)
3c313b6
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)
13aef3f
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)
c0fd35f
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)
13ae042
Commits on Mar 18, 2006
grahamd SSI code specific to Apache 2.0 was incorrectly referencing the Apach…
…e 2.1+

macro SSI_CREATE_ERROR_BUCKET. (MODPYTHON-104)
deaa2ba
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)
3498b0b
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)
b9c7e54
grahamd Forgot to document that req.canonical_filename was made writable in p…
…revious

changes. (MODPYTHON-128)
de307c0
grahamd Added req.set_etag(), req.set_last_modified() and req.update_mtime()
functions as wrappers for similar functions provided by Apache C API.
(MODPYTHON-130)
1526701
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)
8c9e7c4
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)
25d3a7c
Commits on Mar 22, 2006
jgallacher FieldStorage efficiency improvement provided by
Mike Looijmans.  Adapted FieldStorage documentation examples
from Barry Pearce.
(MODPYTHON-93)
d20e37a
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.
(MODPYTHON-103) (MODPYTHON-146)
c7751dd
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)
f3b376a
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.
2eb05de
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)
9f7e26d
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)
6f1fe9c
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 127.0.0.1 but the actual IP address
of the host. (MODPYTHON-120) (MODPYTHON-121)
e970f84
grahamd Note made in session documentation that a save is required to avoid
session timeouts. (MODPYTHON-111)
6c6e992
grahamd Added req.discard_request_body() function as wrapper for similar func…
…tion

provided by Apache C API. The function tests for and reads any message body
in the request, simply discarding whatever it receives. (MODPYTHON-153)
abfd597
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
necessary.

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.
5c5b755
grahamd A variable of type hl_entry was being used to copy pointer values of …
…type

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
are.
40eafc3
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.
e937938
grahamd Fixed various constness and other pointer typing issues to eliminate …
…warnings

generated by compiler.
d921cb9
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)
6529b92
grahamd Added additional debugging and logging output for where mod_python ca…
…nnot

initialise itself properly due to Python or mod_python version mismatches
or missing Python module code files. (MODPYTHON-158)
2267cc1
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)
85f172a
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.
8dc7c17
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)
8946da3
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.
(MODPYTHON-126])

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)
b1fa4e7
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)
fa79dc1
Commits on Apr 20, 2006
grahamd Debian backported ap_regex_t to Apache 2.0 and thus made official ver…
…sion

checking break for this feature. Use explicit check for AP_REG_EXTENDED
in addition to version check. (MODPYTHON-63) (MODPYTHON-126)
97fb28a
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)
2ce9ce4
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)
36e9658
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)
f20077b
grahamd Error path in SSI code when interpreter could not be obtained was trying
to wrongly release the interpreter. (MODPYTHON-104)
3bc5004
Commits on Apr 24, 2006
grahamd When fix for MODPYTHON-134 was made resulting in boolean mod_python c…
…onfig

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.
f462235
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.
70933de
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)
5bef3ce
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)
adbe87a
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.
(MODPYTHON-154)
fb152f6
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)
6dd6010
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.
(MODPYTHON-168)
b70c312
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 req.next 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)
8b805ef
grahamd Added support to cookies for "httponly" attribute, an extension origi…
…nally

created by Microsoft, but now getting more widespread use in the battle
against cross site-scripting attacks. (MODPYTHON-108)
f85e09e
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)
4c25088
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.
9f36e66
Commits on May 06, 2006
grahamd When specifying multiple handlers for phases other than the content p…
…hase

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)
4e1a8dd
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)
4282d23
Commits on May 08, 2006
grahamd Eliminated crash when dynamically registered filters used in conjunct…
…ion with

PythonInterpPerDirective. (MODPYTHON-103)
d78a192
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)
8dbab92
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)
bbf0458
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)
4ab94e5
Commits on May 20, 2006
jgallacher Refactored util.py to fix egregious indent problems. There was a mixture
of 3 and 4 space indents splattered throughout the file. Ugh.
26a4475
jgallacher Bumped version strings. bc0b0f7
jgallacher Fixed some more indentation problems. Everything in lib/python/mod_py…
…thon/*py

should now be correctly indented with 4 spaces.
7d68e36
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.
f71b913
Commits on Jun 23, 2006
jgallacher Fixed DbmSession file creation such that the db file will
be created with mode 0640. (MODPYTHON-173)
08393f1
jgallacher Updated changes section of docs. (MODPYTHON-173) a06a3ef
jgallacher The original change to fix the symlink issue for req.sendfile was cau…
…sing

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.
ce35600
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…
…gtree_walk.
ca8cbc5
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.
8bda5b0
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.
ab94014
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)
6518634
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)
31e6f62
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)
f60345a
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
deadlock.

(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.
04d15e3
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
code.
fceac6c
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.
4088396
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.
5aea87d
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.
a79e832
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.
ffa9273
Commits on Aug 08, 2006
grahamd (MODPYTHON-84) Further fix related to symlinks in req.sendfile() not …
…noted

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

will be normalised with the result being a POSIX style pathname as required
by Apache.
7540301
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.
7d43bae
jgallacher Credit where credit is due. Added information on Aaron Watters early
contribution to mod_python.
bb7de72
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 = "".
(MODPYTHON-185)
f080677
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.
b75c8bc
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.
a473720
grahamd Borrowed references incorrectly having their reference counts decreme…
…nted

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

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().
87ff633
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.
8090d47
grahamd (MODPYTHON-184) Documentation on fix to memory leak in apache.make_ta…
…ble().
06d634b
Commits on Oct 02, 2006
grahamd (MODPYTHON-171) Reverted changes which resulted in automatic normalis…
…ation

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.
d302ecc
grahamd (MODPYTHON-159) Fix FieldStorage class so that it can handle multiline
headers.
7140d89
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
phase.
67af158
grahamd (MODPYTHON-189) Fixed representation returned by calling repr() on a …
…table

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

duplicate method listing.
3a4d0d1
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
shutdown.
eab1bcb
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.
84620f8
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…
…ttention

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

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.
d6ed0d9
jgallacher (MODPYTHON-119) test_psp_error was automagically creating a dbm file …
…session

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.
573fd34
Commits on Oct 21, 2006
grahamd (MODPYTHON-194) Fixed potential memory leak when thread state objects…
… weren't

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

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

in the details logged and returned for an exception occuring in a handler.
ea18d7e
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().
3170064
Commits on Oct 24, 2006
grahamd (MODPYTHON-196) Added log_error() methods to server and connection ob…
…jects.

Also removed some unused variables which were causing compiler warnings.
ad31777
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.
7731149
Commits on Oct 26, 2006
grahamd (MODPYTHON-93) Fix up issues whereby quick lookup table onto list of …
…form

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.
aa541ff
Commits on Oct 27, 2006
grahamd (MODPYTHON-93) Restored a level of backward compatibility for third p…
…arty

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.
0fa9d99
grahamd (MODPYTHON-93) Logic check on when to trigger backwards compatibility…
… mode

for Field class was wrong way around.
c096dbb
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…
…Storage.
208d1ed
grahamd Note about using AuthAuthoritative and AuthBasicAuthoritative directi…
…ves.
060e754
grahamd (MODPYTHON-127) Updated internal PythonOption setting names to all use a
'mod_python'. prefix. The old names are still supported for backward
compatability.
d710d6a
grahamd (MODPYTHON-104) Contributed personal article on using Python code wit…
…h SSI

under mod_python. The original article was sourced from
'http://www.dscpl.com.au/wiki/ModPython/Articles/BasicsOfServerSideIncludes';.
c5d300c
grahamd Add note about using apache.DONE in non response phase handlers when …
…wishing

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

apply it to dictionary itself.
0dc907c
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.
b48bedb
grahamd (MODPYTHON-143) Can't set generation to zero prior to import as that …
…stops

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.
163a327
grahamd (MODPYTHON-143) When cache is frozen or autoreload is disabled and a …
…module

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.
f5bc4c2
grahamd (MODPYTHON-143) Use a separate flag in the cache to indicate that a m…
…odule

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.
11dc2c1
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.
343ad0a
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.
0177135
grahamd Add link to my personal articles on mod_python into installation section
of documentation.
35f0fbd
grahamd (MODPYTHON-93) The __delitem__() wasn't throwing a KeyError exception…
… when

the field name didn't exist.
3b6383a
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.
03bff9e
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.
2725252
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.
72188f9
grahamd (MODPYTHON-143) Cleanup code formatting debug output for children and…
… friends.
dae5674
Commits on Nov 03, 2006
grahamd The request object add_handler() function should allow None to be sup…
…plied

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

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).
5e95f1a
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.
0a9b870
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.
7e6050f
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.
3b3e273
Commits on Nov 09, 2006
grahamd (MODPYTHON-195) Fix potential Win32 resource leaks in parent Apache p…
…rocess

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

when PythonOption namespace changes were implemented.
4260fa8
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.
03af8a5
Commits on Nov 13, 2006
grahamd Need to normalise paths in sys.path for PythonImport test case as sys…
….path

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

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.
1c89a35
Commits on Nov 14, 2006
grahamd Attempt to auto detect when Apache uses APR 1.0 and link to those lib…
…raries

instead of older libraries when on Windows.
7fb56ef
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.
84ecfba
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
directive.
1a2e1a0
grahamd (MODPYTHON-207) The attribute req.args is now modifiable and can be set
from within handlers.
49ef6c4
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.
45a1cd5
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.
939bc06
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.
352ddc3
grahamd Updated documentation of the req.meets_condition() member function to…
… show

req.update_mtime() and req.set_last_modified() in example.
7485a33
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 '~/'.
f3593e6
jgallacher Added link to the mod_python wiki CategorySecurity to the security se…
…ction

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

appropriate.
acea2ac
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.
e835231
grahamd Progressive documentation updates for the apache.import_module() func…
…tion.
28ed604
grahamd (MODPYTHON-143) Allow just '~' to be used as a directory in the module
importer search path to refer to the handler root directory.
48e443f
grahamd Further updates to documentation for the apache.import_module() funct…
…ion.
25fff17
grahamd Further documentation for the apache.import_module() function. a769c9f
grahamd More documentation about apache.import_module(), specifically, how to…
… enable

the old importer.
3347e43
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.
3aabfcf
Commits on Dec 04, 2006
grahamd Update notes in change log in respect of companion functions needed t…
…o use

req.meets_condition().
7789881
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.
2ee29dd
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…
…ject.
a56532d
jgallacher Documentation housecleaing. Added "Changes from Version 3.3.1" to App…
…endix.
1e2d11a
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.
47cd13b
Commits on Nov 09, 2007
jgallacher (MODPYTHON-243) Fixed format string error. b019041