[mod_python] Aliasing extensions in mod_python

Colin Bean ccbean at gmail.com
Sun Aug 26 18:24:21 EDT 2007


You might also try setting the content-disposition header of your
request to specify a file name -- this might be all you need, if the
phone uses it correctly.
Also, you could use mod_rewrite to do the "alias" you mentioned (if
you didn't want to change your existing python handler).  Take a look
a the documentation on the apache httpd site...

-Colin

On 8/26/07, Roger Holness <hlnrog001 at gmail.com> wrote:
> Hi
>
> I am working on a python script to generate dynamic wml
>
> I am using publisher of mod_python
>
> The problem I am having is that my script returns valid wml but my
> phone that I am testing on (and I assume others as well) doesn't check
> the mime type, rather just the extension
>
> ie. www.mywebsite/wml.py/test  is returning valid wml, but the phone
> doesn't realise that as it is expecting /test.wml
>
> Now functions names can't contain periods, so I can't do:
> def test.wml(req)
>
> I am therefore trying to alias wml.py/test.wml to wml.py/test,
> effectively tricking the phone into doing what it should be doing in
> the first place
>
> Any ideas how I would go about this?
>
> Regards
>
> Roger
>
> PS. Yes, I am a noob :P
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>


More information about the Mod_python mailing list