% Let's introduce a little organization here by listing the changes
% by JIRA issue. This will make it a little easier to reorganize this 
% file when an issue is backported.
%
% ### PUT ANY CURRENT CHANGES INTO THE SECTION
% ###     Changes from version 3.3.1
%
%
\chapter{Changes from Version (3.3.1)\label{app-changes-from-3.3.1}}
% Details on changes committed to svn trunk should go in this section.
% There is no immediate plan to create branches/3.3.x, so for the time
% being this is the correct section to document changes.

\indexii{Changes from}{version 3.3.1}

  New Features

  \begin{itemize}
    \item
      NONE
  \end{itemize}

  Improvements

  \begin{itemize}
    \item
      NONE
  \end{itemize}

  Bug Fixes

  \begin{itemize}
  \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-220]{MODPYTHON-220})
      Fix 'import' from same directory as PSP file.
  \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-226]{MODPYTHON-226})
      Make \code{req.status_line} writable.
  \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-238]{MODPYTHON-238})
      Make \code{req.chunked} and \code{req.connection.keepalive} writable.
      Being able to set these allows chunking to be turned off when HTTP/1.1
      is used but no content length supplied in response.
  \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-245]{MODPYTHON-245})
      Fix prototype of optional exported function
      \code{mp_release_interpreter()}.
  \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-249]{MODPYTHON-249})
      Fixed incorrect use of APR bucket brigades shown up by APR 1.3.2.
  \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-250]{MODPYTHON-250})
      Fixed MacOS X (10.5) Leopard 64 bit architecture problems.
    \item
  \end{itemize}

\chapter{Changes from Version (3.2.10)\label{app-changes-from-3.2.10}}

\indexii{Changes from}{version 3.2.10}

  New Features

  \begin{itemize}
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-103]{MODPYTHON-103})
      New \code{req.add_output_filter()}, \code{req.add_input_filter()},
      \code{req.register_output_fiter()}, \code{req.register_input_filter()}
      methods. These allows the dynamic registration of filters and the
      attaching of filters to the current request.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-104]{MODPYTHON-104})
      Support added for using Python in content being passed through "INCLUDES"
      output filter, or as more commonly referred to server side include (SSI)
      mechanism.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-108]{MODPYTHON-108})
      Added support to cookies for \code{httponly} attribute, an extension
      originally created by Microsoft, but now getting more widespread use
      in the battle against cross site-scripting attacks.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-118]{MODPYTHON-118})
      Now possible using the \code{PythonImport} directive to specify the name
      of a function contained in the module to be called once the designated
      module has been imported.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-124]{MODPYTHON-124})
      New \code{req.auth_name()} and \code{req.auth_type()} methods.
      These return the values associated with the AuthName and AuthType
      directives respectively. The \code{req.ap_auth_type} has now also
      been made writable so that it can be set by an authentication
      handler.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-130]{MODPYTHON-130})
      Added \code{req.set_etag()}, \code{req.set_last_modified()} and
      \code{req.update_mtime()} functions as wrappers for similar functions
      provided by Apache C API. These are required to effectively use the
      \code{req.meets_condition()} function. The documentation for
      \code{req.meets_condition()} has also been updated as what it
      previously described probably wouldn't actually work.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-132]{MODPYTHON-132})
      New \code{req.construct_url()} method. Used to construct a fully
      qualified URI string incorporating correct scheme, server and port.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-144]{MODPYTHON-144})
      The \samp{apache.interpreter} and \samp{apache.main_server} attributes
      have been made publically available. These were previously private and
      not part of the public API.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-149]{MODPYTHON-149})
      Added support for session objects that span domains.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-153]{MODPYTHON-153})
      Added \code{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.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-164]{MODPYTHON-164})
      The \code{req.add_handler()}, \code{req.register_input_filter()} and
      \code{req.register_output_filter()} methods can now take a direct
      reference to a callable object as well a string which refers to a
      module or module::function combination by name.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-165]{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.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-170]{MODPYTHON-170})
      Added \code{req._request_rec}, \code{server._server_rec} and
      \code{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.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-193]{MODPYTHON-193})
      Added new attribute available as \code{req.hlist.location}. For a
      handler executed directly as the result of a handler directive
      within a \code{Location} directive, this will be set to the value
      of the \code{Location} directive. If \code{LocationMatch}, or
      wildcards or regular expressions are used with \code{Location},
      the value will be the matched value in the URL and not the pattern.
  \end{itemize}

  Improvements
  
  \begin{itemize}
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-27]{MODPYTHON-27})
      When using mod_python.publisher, the \code{__auth__()} and
      \code{__access__()} functions and the \code{__auth_realm__} string
      can now be nested within a class method as a well a normal function.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-90]{MODPYTHON-90})
      The \code{PythonEnablePdb} configuration option will now be ignored
      if Apache hasn't been started up in single process mode.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-91]{MODPYTHON-91})
      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 \code{None} being returned with a subsequent error complaining
      about the handler returning an invalid value.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-93]{MODPYTHON-93})
      Improved \code{util.FieldStorage} efficiency and made the interface
      more dictionary like.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-101]{MODPYTHON-101})
      Force an exception when handler evaluates to something other than
      \code{None} but is otherwise not callable. Previously an exception
      would not be generated if the handler evaluated to \code{False}.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-107]{MODPYTHON-107})
      Neither mod_python.publisher nor mod_python.psp explicitly flush
      output after writing the content of the response back to the request
      object. By not flushing output it is now possible to use the
      "CONTENT_LENGTH" output filter to add a "Content-Length" header.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-111]{MODPYTHON-111})
      Note made in session documentation that a save is required to avoid
      session timeouts.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-125]{MODPYTHON-125})
      The \code{req.handler} attribute is now writable. This allows a handler
      executing in a phase prior to the response phase to specify which
      Apache module will be responsible for generating the content.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-128]{MODPYTHON-128})
      Made the \code{req.canonical_filename} attribute writable. Changed
      the \code{req.finfo} attribute from being a tuple to an actual object.
      For backwards compatibility the attributes of the object can still be
      accessed as if they were a tuple. New code however should access
      the attributes as member data. The \code{req.finfo} attribute is
      also now writable and can be assigned to using the result of calling
      the new function \code{apache.stat()}. This function is a wrapper
      for \code{apr_stat()}.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-129]{MODPYTHON-129})
      When specifying multiple handlers for a phase, 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 stacked handlers of any phase would in
      turn previously be executed as long as they returned \code{apache.OK},
      this is no longer the case and what happens is dependent on the
      phase. Specifically, a handler returning \code{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 \code{PythonTransHandler},
      \code{PythonAuthenHandler}, \code{PythonAuthzHandler} and
      \code{PythonTypeHandler}, as soon as \code{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 \code{apache.OK} is returned as well as when
      \code{apache.DECLINED} is returned. This new interpretation of the
      status returned also applies to stacked content handlers listed
      against the \code{PythonHandler} directive even though Apache
      notionally only ever calls at most one content handler. Where all
      stacked content handlers in that phase run, the status returned from
      the last handler becomes the overall status from the content phase.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-141]{MODPYTHON-141})
      The \code{req.proxyreq} and \code{req.uri} attributes are now writable.
      This allows a handler to setup these values and trigger proxying of the
      current request to a remote server.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-142]{MODPYTHON-142})
      The \code{req.no_cache} and \code{req.no_local_copy} attributes are
      now writable.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-143]{MODPYTHON-143})
      Completely reimplemented the module importer. This is now used
      whenever modules are imported corresponding to any of the
      \code{Python*Handler}, \code{Python*Filter} and \code{PythonImport}
      directives. The module importer is still able to be used directly
      using the \code{apache.import_module()} function. The new module
      importer no longer supports automatic reloading of packages/modules
      that appear on the standard Python module search path as defined by
      the \code{PythonPath} directive or within an application by direct
      changes to \code{sys.path}. Automatic module reloading is however
      still performed on file based modules (not packages) which are
      located within the document tree where handlers are located.
      Locations within the document tree are however no longer added to the
      standard Python module search path automatically as they are
      maintained within a distinct importer search path. The
      \code{PythonPath} directive MUST not be used to point at directories
      within the document tree. To have additional directories be searched
      by the module importer, they should be listed in the
      \code{mod_python.importer.path} option using the \code{PythonOption}
      directive. This is a path similar to how \code{PythonPath} argument
      is supplied, but MUST not reference \code{sys.path} nor contain any
      directories also listed in the standard Python module search path.
      If an application does not appear to work under the module importer,
      the old module importer can be reenabled by setting the
      \code{mod_python.legacy.importer} option using the \code{PythonOption}
      directive to the value '\code{*}'. This option must be set in the
      global Apache configuration.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-152]{MODPYTHON-152})
      When in a sub request, when a request is the result of an internal
      redirect, or when when returning from such a request, the
      \code{req.main}, \code{req.prev} and \code{req.next} members now
      correctly return a reference to the original Python request object
      wrapper first created for the specific \code{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.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-178]{MODPYTHON-178})
      When using mod_python.psp, if the PSP file which is the target of the
      request doesn't actually exist, an \code{apache.HTTP_NOT_FOUND} server
      error is now returned to the client rather than raising a
      \code{ValueError} exception which results in a 500 internal server error.
      Note that if using \code{SetHandler} and the request is against the
      directory and no \code{DirectoryIndex} directive is specified which
      lists a valid PSP index file, then the same \code{apache.HTTP_NOT_FOUND}
      server error is returned to the client.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-196]{MODPYTHON-196})
      For completeness, added \code{req.server.log_error()} and
      \code{req.connection.log_error()}. The latter wraps
      \code{ap_log_cerror()} (when available), allowing client information
      to be logged along with message from a connection handler.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-206]{MODPYTHON-206})
      The attribute \code{req.used_path_info} is now modifiable and can
      be set from within handlers. This is equivalent to having used the
      \code{AcceptPathInfo} directive.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-207]{MODPYTHON-207})
      The attribute \code{req.args} is now modifiable and can be set from
      within handlers.
  \end{itemize}

  Bug Fixes

  \begin{itemize}
  \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-38]{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
      \code{FieldStorage} object instance cached as \code{req.form} left
      there by preceding code.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-43]{MODPYTHON-43})
      Nested \code{__auth__()} functions in mod_python.publisher now execute
      in context of globals from the file the function is in and not that
      of mod_python.publisher itself.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-47]{MODPYTHON-47})
      Fixed mod_python.publisher so it will not return a HTTP Bad Request
      response when mod_auth is being used to provide Digest authentication.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-63]{MODPYTHON-63})
      When handler directives are used within \code{Directory} or
      \code{DirectoryMatch} directives where wildcards or regular
      expressions are used, the handler directory will be set to the
      shortest directory matched by the directory pattern. Handler
      directives can now also be used within \code{Files} and
      \code{FilesMatch} directives and the handler directory will correctly
      resolve to the directory corresponding to the enclosing
      \code{Directory} or \code{DirectoryMatch} directive, or the directory
      the \code{.htaccess} file is contained in.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-76]{MODPYTHON-76})
      The \code{FilterDispatch} callback should not flush the filter if it
      has already been closed.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-84]{MODPYTHON-84})
      The original change to fix the symlink issue for \code{req.sendfile()}
      was causing problems on Win32, plus code needed to be changed to work
      with APR 1.2.7.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-100]{MODPYTHON-100})
      When using stacked handlers and a \code{SERVER_RETURN} exception was
      used to return an \code{OK} status for that handler, any following
      handlers weren't being run if appropriate for the phase.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-109]{MODPYTHON-109})
      The \code{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.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-112]{MODPYTHON-112})
      The \code{req.phase} attribute is no longer overwritten by an input
      or output filter. The \code{filter.is_input} member should be used
      to determine if a filter is an input or output filter.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-113]{MODPYTHON-113})
      The \code{PythonImport} directive now uses the
      \code{apache.import_module()} function to import modules to avoid
      reloading problems when same module is imported from a handler.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-114]{MODPYTHON-114})
      Fixed race conditions on setting \code{sys.path} when the
      \code{PythonPath} directive is being used as well as problems with
      infinite extension of path.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-120]{MODPYTHON-120})
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-121]{MODPYTHON-121})
      Fixes to test suite so it will work on virtual hosting environments
      where \code{localhost} doesn't resolve to \code{127.0.0.1} but the
      actual IP address of the host.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-126]{MODPYTHON-126})
      When \code{Python*Handler} or \code{Python*Filter} directive is used
      inside of a \code{Files} directive container, the handler/filter
      directory value will now correctly resolve to the directory corresponding
      to any parent \code{Directory} directive or the location of the
      \code{.htaccess} file the \code{Files} directive is contained in.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-133]{MODPYTHON-133})
      The table object returned by \code{req.server.get_config()} was not
      being populated correctly to be the state of directives set at global
      scope for the server.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-134]{MODPYTHON-134})
      Setting \code{PythonDebug} to \code{Off}, wasn't overriding \code{On}
      setting in parent scope.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-140]{MODPYTHON-140})
      The \code{util.redirect()} function should be returning server status of
      \code{apache.DONE} and not \code{apache.OK} otherwise it will not give
      desired result if used in non content handler phase or where there are
      stacked content handlers.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-147]{MODPYTHON-147})
      Stopped directories being added to \code{sys.path} multiple times when
      \code{PythonImport} and \code{PythonPath} directive used.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-148]{MODPYTHON-148})
      Added missing Apache contants \code{apache.PROXYREQ_RESPONSE} and
      \code{apache.HTTP_UPGRADE_REQUIRED}. Also added new constants for
      Apache magic mime types and values for interpreting the
      \code{req.connection.keepalive} and \code{req.read_body} members.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-150]{MODPYTHON-150})
      In a multithread MPM, the \code{apache.init()} function could be called
      more than once for a specific interpreter instance whereas it should
      only be called once.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-151]{MODPYTHON-151})
      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.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-157]{MODPYTHON-157})
      Wrong interpreter name used for fixup handler phase and earlier, when
      \code{PythonInterpPerDirectory} was enabled and request was against
      a directory but client didn't provide the trailing slash.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-159]{MODPYTHON-159})
      Fix \code{FieldStorage} class so that it can handle multiline headers.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-160]{MODPYTHON-160})
      Using \code{PythonInterpPerDirective} when setting content handler to
      run dynamically with \code{req.add_handler()} would cause Apache to
      crash.
     \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-161]{MODPYTHON-161})
      Directory argument supplied to \code{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
      \code{PythonInterpPerDirective} is used.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-166]{MODPYTHON-166})
      \code{PythonHandlerModule} was not setting up registration of the
      \code{PythonFixupHandler} or \code{PythonAuthenHandler}. For the
      latter this meant that using \code{Require} directive with
      \code{PythonHandlerModule} would cause a 500 error and complaint in
      error log about "No groups file".
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-167]{MODPYTHON-167})
      When \code{PythonDebug} was \code{On} and and exception occurred, the
      response to the client had a status of \code{200} when it really should
      have been a \code{500} error status indicating that an internal error
      occurred. A \code{500} error status was correctly being returned when
      \code{PythonDebug} was \code{Off}.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-168]{MODPYTHON-168})
      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.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-175]{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.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-176]{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.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-179]{MODPYTHON-179})
      Fixed the behaviour of req.readlines() when a size hint was provided. Previously,
      it would always return a single line when a size hint was provided.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-180]{MODPYTHON-180})
      Publisher would wrongly output a warning about nothing to publish if
      \code{req.write()} or \code{req.sendfile()} used and data not flushed,
      and then published function returned \code{None}.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-181]{MODPYTHON-181})
      Fixed memory leak when mod_python handlers are defined for more than
      one phase at the same time.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-182]{MODPYTHON-182})
      Fixed memory leak in req.readline().
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-184]{MODPYTHON-184})
      Fix memory leak in \code{apache.make_table()}. This was used by
      \code{util.FieldStorage} class so affected all code using forms.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-185]{MODPYTHON-185})
      Fixed segfault in psp.parsestring(src_string) when src_string is empty.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-187]{MODPYTHON-187})
      Table objects could crash in various ways when the value of an item
      was NULL. This could occur for \code{SCRIPT_FILENAME} when the
      \code{req.subprocess_env} table was accessed in the post read request
      handler phase.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-189]{MODPYTHON-189})
      Fixed representation returned by calling \code{repr()} on a table object.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-191]{MODPYTHON-191})
      Session class will no longer accept a normal cookie if a signed cookie
      was expected.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-194]{MODPYTHON-194})
      Fixed potential memory leak due to not clearing the state of thread state
      objects before deleting them.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-195]{MODPYTHON-195})
      Fix potential Win32 resource leaks in parent Apache process when process
      restarts occur.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-198]{MODPYTHON-198})
      Python 2.5 broke nested __auth__/__access__/__auth_realm__ in
      mod_python.publisher.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-200]{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.
  \end{itemize}


\chapter{Changes from Version (3.2.8)\label{app-changes}}
% mod_python version 3.2.10

\indexii{Changes from}{version 3.2.8}

  New Features

  \begin{itemize}
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-78]{MODPYTHON-78})
      Added support for Apache 2.2.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-94]{MODPYTHON-94})
      New \code{req.is_https()} and \code{req.ssl_var_lookup()} methods.
      These communicate direct with the Apache mod_ssl module, allowing
      it to be determined if the connection is using SSL/TLS and what the
      values of internal ssl variables are.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-131]{MODPYTHON-131})
      The directory used for mutex locks can now be specified at 
      at compile time using \code{./configure --with-mutex-dir value}
      or at run time with \code{PythonOption mod_python.mutex_directory value}.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-137]{MODPYTHON-137})
      New \code{req.server.get_options()} method. This returns the subset
      of Python options set at global scope within the Apache configuration.
      That is, outside of the context of any VirtualHost, Location, Directory
      or Files directives.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-145]{MODPYTHON-145})
      The number of mutex locks can now be specified at run time with
      \code{PythonOption mod_python.mutex_locks value}.
    \item
     (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-172]{MODPYTHON-172})
      Fixed three memory leaks that were found in _apachemodule.parse_qsl, req.readlines
      and util.cfgtree_walk.
  \end{itemize}

  Improvements

  \begin{itemize}
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-77]{MODPYTHON-77})
      Third party C modules that use the simplified API for the Global
      Interpreter Lock (GIL), as described in PEP 311, can now be used. The
      only requirement is that such modules can only be used in the context
      of the \samp{main_interpreter}.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-119]{MODPYTHON-119})
      DbmSession unit test no longer uses the default directory for the dbm file,
      so the test will not interfer with the user's current apache instance.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-158]{MODPYTHON-158})
      Added additional debugging and logging output for where mod_python
      cannot initialise itself properly due to Python or mod_python version
      mismatches or missing Python module code files.
  \end{itemize}

  Bug Fixes

  \begin{itemize}
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-84]{MODPYTHON-84})
      Fixed request.sendfile() bug for symlinked files on Win32.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-122]{MODPYTHON-122})
      Fixed configure problem when using bash 3.1.x.
    \item
      (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-173]{MODPYTHON-173})
      Fixed DbmSession to create db file with mode 0640.
  \end{itemize}
 
\chapter{Changes from Version (3.2.7)\label{app-changes-from-3.2.7}}

\indexii{Changes from}{version 3.2.7}

  Security Fix 

  \begin{itemize}
    \item
    (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-135]{MODPYTHON-135})
    Fixed possible directory traversal attack in FileSession. The session
    id is now checked to ensure it only contains valid characters. This
    check is performed for all sessions derived from the BaseSession 
    class. 
  \end{itemize}

\chapter{Changes from Version (3.1.4)\label{app-changes-from-3.1.4}}

\indexii{Changes from}{version 3.1.4}
  
  New Features

  \begin{itemize}
    \item
      New \code{apache.register_cleanup()} method.
    \item
      New \code{apache.exists_config_define()} method.
    \item
      New file-based session manager class.
    \item
      Session cookie name can be specified.
    \item
      The maximum number of mutexes mod_python uses for session locking
      can now be specifed at compile time using 
      \code{configure --with-max-locks}.
    \item
      New a version attribute in mod_python module.
    \item
      New test handler \code{testhandler.py} has been added.
  \end{itemize}

  Improvements

  \begin{itemize}
    \item
      Autoreload of a module using \code{apache.import_module()} now works if
      modification time for the module is different from the file.
      Previously, the module was only reloaded if the the modification 
      time of the file was more recent. This allows for a more graceful
      reload if a file with an older modification time needs to be
      restored from backup.
    \item
      Fixed the publisher traversal security issue
    \item
      Objects hierarchy a la CherryPy can now be published.
    \item
      \code{mod_python.c} now logs reason for a 500 error
    \item
      Calls to \code{PyErr_Print} in \code{mod_python.c} are now followed by \code{fflush()}
    \item
      Using an empty value with PythonOption will unset a PythonOption key.
    \item
      \code{req.path_info} is now a read/write member.
    \item
      Improvements to FieldStorage allow uploading of large files. Uploaded
      files are now streamed to disk, not to memory.
    \item
      Path to flex is now discovered at configuration time or can be
      specifed using \code{configure --with-flex=/path/to/flex}.
    \item
      \code{sys.argv} is now initialized to \code{["mod_python"]} so that modules
      like numarray and pychart can work properly.
  \end{itemize}

  Bug Fixes

  \begin{itemize}
    \item
      Fixed memory leak which resulted from circular references starting 
      from the request object.
    \item
      Fixed memory leak resulting from multiple PythonOption directives. 
    \item
      Fixed Multiple/redundant interpreter creation problem.
    \item
      Cookie attributes  with attribute names prefixed with 
      \$ are now ignored. See Section \ref{pyapi-cookie} for more 
      information.
    \item
      Bug in setting up of config_dir from Handler directives fixed.
    \item
      mod_python.publisher will now support modules with the same name
      but in different directories
    \item
      Fixed continual reloading of modules problem
    \item
      Fixed big marshalled cookies error.
    \item
      Fixed mod_python.publisher extension handling
    \item
      mod_python.publisher default index file traversal
    \item
      mod_python.publisher loading wrong module and giving no
      warning/error
    \item
      \code{apply_fs_data()} now works with "new style" objects
    \item
      File descriptor fd closed after \code{ap_send_fd()} in \code{req_sendfile()}
    \item
      Bug in mem_cleanup in MemorySession fixed.
    \item
      Fixed bug in \code{_apache._global_lock()} which could cause a segfault 
      if the lock index parameter is greater number of mutexes created
      at mod_python startup.
    \item
      Fixed bug where \code{local_ip} and \code{local_host} in connection object 
      were returning \code{remote_ip} and \code{remote_host} instead
    \item
      Fixed install_dso Makefile rule so it only installs the dso, not the
      python files
    \item
      Potential deadlock in psp cache handling fixed
    \item
      Fixed bug where sessions are used outside <Directory> directive.
    \item 
      Fixed compile problem on IRIX. \code{ln -s} requires both TARGET and LINK_NAME
      on IRIX. ie. \code{ln -s TARGET LINK_NAME}
    \item
      Fixed \code{./configure} problem on SuSE Linux 9.2 (x86-64). Python libraries
      are in lib64/ for this platform.
    \item
      Fixed \code{req.sendfile()} problem where \code{sendfile(filename)} sends the incorrect
      number of bytes when filename is a symlink. 
    \item
      Fixed problem where util.FieldStorage was not correctly checking the mime
      types of POSTed entities
    \item
      Fixed \code{conn.local_addr} and \code{conn.remote_addr} for a better IPv6 support. 
    \item
      Fixed \code{psp_parser.l} to properly escape \code{backslash-n}, \code{backslash-t}
      and \code{backslash-r} character sequences. 
    \item
      Fixed segfault bug when accessing some request object members 
      (allowed_methods, allowed_xmethods, content_languages) and some server
      object members (names, wild_names).
    \item
      Fixed request.add_handler() segfault bug when adding a handler to an empty
      handler list.
    \item
      Fixed PythonAutoReload directive so that AutoReload can be turned off.
    \item
      Fixed connection object read() bug on FreeBSD.
    \item
      Fixed potential buffer corruption bug in connection object read().
\end{itemize}

\chapter{Changes from Previous Major Version (2.x)\label{app-changes-from-2.x}}

\indexii{Changes from}{version 2.x}

  \begin{itemize}

    \item
      Mod_python 3.0 no longer works with Apache 1.3, only Apache 2.x is
      supported.
    \item
      Mod_python no longer works with Python versions less than 2.2.1
    \item 
      Mod_python now supports Apache filters.
    \item 
      Mod_python now supports Apache connection handlers.
    \item 
      Request object supports internal_redirect().
    \item
      Connection object has read(), readline() and write().
    \item
      Server object has get_config().
    \item
      \index{Httpdapy} \index{httpdapi}
      Httpdapi handler has been deprecated.
    \item
      \index{ZPublisher}
      Zpublisher handler has been deprecated.
    \item
      Username is now in req.user instead of req.connection.user
  \end{itemize}
