Checkout Tools
  • last updated 5 hours ago
Constraints: committers
Constraints: files
Constraints: dates
(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.

  1. … 5 more files in changeset.
(MODPYTHON-207) The attribute req.args is now modifiable and can be set

from within handlers.

  1. … 2 more files in changeset.
The attribute req.used_path_info is now modifiable and can be set from

within handlers. This is equivalent to having used the AcceptPathInfo


  1. … 4 more files in changeset.
(MODPYTHON-125) When assigning to req.handler, should allow it to be set

to None to reset it.

  1. … 3 more files in changeset.
The request object add_handler() function should allow None to be supplied

as the optional path argument and have it be interpreted as if the argument

was never supplied in the first place.

  1. … 2 more files in changeset.
(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.

  1. … 9 more files in changeset.
(MODPYTHON-196) Added log_error() methods to server and connection objects.

Also removed some unused variables which were causing compiler warnings.

  1. … 8 more files in changeset.
(MODPYTHON-59) Excised the code stub for the req.get_session() functionality.

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.

(MODPYTHON-190) Added comments for lines of code which will require attention

for Python 2.5 / 64-bit support. These were the lines that were identified

by the script.

  1. … 6 more files in changeset.
(MODPYTHON-180) Publisher would wrongly output a warning about nothing to

publish if req.write() or req.sendfile() used and data not flushed, and

then published function returned None.

  1. … 5 more files in changeset.
Thread locks not being released when fatal error condition occurs. Remove

duplicate method listing.

  1. … 1 more file in changeset.
(MODPYTHON-171) Reverted changes which resulted in automatic normalisation

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.

  1. … 3 more files in changeset.
(MODPYTHON-128) Changed req.finfo to be an object where fields of underlying

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().

  1. … 13 more files in changeset.
Fixed memory leak in req.readline() (MODPYTHON-182)

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.

  1. … 11 more files in changeset.
(MODPYTHON-171) When a pathname is assigned to req.filename, the pathname

will be normalised with the result being a POSIX style pathname as required

by Apache.

  1. … 4 more files in changeset.
(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.

  1. … 6 more files in changeset.
(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.

  1. … 9 more files in changeset.
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)

  1. … 17 more files in changeset.
Fix + unit test for #MODPYTHON-179.
  1. … 5 more files in changeset.
Fix for #MODPYTHON-172 and other memory leaks in req.readlines and cfgtree_walk.
  1. … 2 more files in changeset.
The original change to fix the symlink issue for req.sendfile was causing

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.

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)

  1. … 5 more files in changeset.
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)

  1. … 8 more files in changeset.
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)

  1. … 2 more files in changeset.
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)

  1. … 9 more files in changeset.
Fixed various constness and other pointer typing issues to eliminate warnings

generated by compiler.

  1. … 1 more file in changeset.
Added req.discard_request_body() function as wrapper for similar function

provided by Apache C API. The function tests for and reads any message body

in the request, simply discarding whatever it receives. (MODPYTHON-153)

  1. … 6 more files in changeset.
Added req.set_etag(), req.set_last_modified() and req.update_mtime()

functions as wrappers for similar functions provided by Apache C API.


  1. … 4 more files in changeset.
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)

  1. … 5 more files in changeset.