Checkout Tools
  • last updated 6 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
WinZIP on Windows boxes ignores empty directories in tar files when extracting

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.

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.

Fixed regession for MODPYTHON-119 in tests. One of the unittests was missed

when PythonOption namespace changes were implemented.

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

  1. … 8 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.
(MODPYTHON-127) Updated internal PythonOption setting names to all use a

'mod_python'. prefix. The old names are still supported for backward

compatability.

  1. … 4 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-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.

(MODPYTHON-187) Table objects could crash in various ways when the value 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.

  1. … 2 more files in changeset.
(MODPYTHON-159) Fix FieldStorage class so that it can handle multiline

headers.

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

  1. … 4 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-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.

  1. … 2 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. … 16 more files in changeset.
This slipped through my check in review. Graham's importer was enabled by default. Reverting back to the normal.
Fix + unit test for #MODPYTHON-179.
  1. … 2 more files in changeset.
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.

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)

  1. … 4 more files in changeset.
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. … 4 more files in changeset.
When specifying multiple handlers for phases other than the content phase

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)

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

  1. … 4 more files in changeset.
Added support for cross domain session objects. (MODPYTHON-149)

  1. … 5 more files in changeset.
Force an exception when handler evaluates to something other than None but

is otherwise not callable. Previously an exception would not be generated

if the handler evaluated to False. (MODPYTHON-101)

  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.

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

  1. … 7 more files in changeset.
Using PythonInterpPerDirective when setting content handler to

run dynamically with req.add_handler() would cause Apache to

crash. (MODPYTHON-160)

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

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)

  1. … 4 more files in changeset.
svn:eol-style = native

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