[mod_python] Strange request.parsed_uri

Igor Stroh igor at rulim.de
Wed Jan 26 09:07:58 EST 2005


Hi all,

under which circumstances are the first 6 tuple members
of request.parsed_uri None? The unparsed_uri member
returns only the path portion too (along with query stuff).
Funny enough, it already worked, i.e. I already have had
a setup where the parsed_uri tuple contained at least
7 members which where not None - scheme, hostname, username...

Any ideas?

Apache2 config:
===============================================================
<VirtualHost 1.2.3.4:80>
    ServerName    foo.bar.com
    ServerAdmin   john.dow at foo.bar.com
    ServerSignature Off

    LogLevel debug
    CustomLog     /var/log/apache2/foo.bar/access.log combined
    ErrorLog      /var/log/apache2/foo.bar/error.log
    TransferLog   /var/log/apache2/foo.bar/transfer.log

    SetHandler mod_python
    #PythonOption "ApplicationPath" "/"
    PythonPath "['/usr/share/myHandlerModule'] + sys.path"
    PythonHandler myHandler
    PythonDebug On
</VirtualHost>
===============================================================


myHandler.py:
===============================================================
from mod_python import apache
def handler(REQUEST):
    REQUEST.conditions = "text/plain"
    REQUEST.send_http_header()
    REQUEST.write("Parsed URI: %s\n" % str(REQUEST.parsed_uri))
    return apache.OK
===============================================================

Version info:
python 2.3.4-5
apache2 2.0.52-3 (mpm-prefork)
mod_python 3.1.3-2.2

TIA,
Igor


More information about the Mod_python mailing list