Package: libapache2-mod-python2.3 Version: 3.1.3-3 Severity: important Tags: patch
RFC 2616 specifies the following: The metainformation contained in the HTTP headers in response to a HEAD request SHOULD be identical to the information sent in response to a GET request. Mod-python's publisher handler only supports GET and POST. This causes some versions of Firefox to fail when saving a page because Firefox attempts to verify it's own cache with a HEAD request (which gets a 405 method not allowed). This can be fixed with the attached small patch (the handler seems to already almost support the HEAD-request). I tested the patch and it works. -- System Information: Debian Release: 3.1 APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing') Architecture: i386 (i686) Kernel: Linux 2.4.26-1-k7 Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15) Versions of packages libapache2-mod-python2.3 depends on: ii apache2 2.0.52-3 Next generation, scalable, extenda ii apache2-common 2.0.52-3 Next generation, scalable, extenda ii apache2-mpm-prefork [apache 2.0.52-3 Traditional model for Apache2 ii debconf 1.4.42 Debian configuration management sy ii libc6 2.3.2.ds1-20 GNU C Library: Shared libraries an ii python2.3 2.3.4-19 An interactive high-level object-o -- debconf information: * libapache2-mod-python/enable_module: true
--- /usr/lib/python2.3/site-packages/mod_python/publisher.py 2005-02-11 13:26:02.000000000 +0200 +++ publisher.py 2005-02-28 14:43:31.000000000 +0200 @@ -44,8 +44,8 @@ def handler(req): - req.allow_methods(["GET", "POST"]) - if req.method not in ["GET", "POST"]: + req.allow_methods(["GET", "POST", "HEAD"]) + if req.method not in ["GET", "POST", "HEAD"]: raise apache.SERVER_RETURN, apache.HTTP_METHOD_NOT_ALLOWED func_path = ""