mod_python mime-type text/x-python
Hi.
Habe das Problem, dass meine python-skripte zwar ausgeführt, aber dann
nicht im Browser angezeigt, sondern nur zum Download angeboten werden.
Ich nehme mal an, dass das damit zu tun hat, dass Content-Type:
text/x-python übertragen wird (laut ethereal).
Meine Konfiguration ist fast die, die man erhält, wenn man einfach nur
libapache2-mod-python installiert, geändert habe ich nur in der
sites-available/default:
---snip---
<Directory /var/www/>
Options Indexes FollowSymLinks -MultiViews
AllowOverride None
Order allow,deny
allow from all
AddHandler mod_python .py
PythonHandler mptest
PythonDebug On
</Directory>
---snip---
Die mptest.py sieht folgendermaßen aus:
---snip---
from mod_python import apache
def handler(req):
req.write("Hello World!")
return apache.OK
---snip---
Wenn ich das "Hello World!" ändere in "Content-Type: text/html\n\nHello
World!", passiert dasselbe...
--
Simon Eilting
Reply to: