Apache Mod-Python - Commented: (MODPYTHON-72) mod_python.publisher no longer pays attention to result of r

This is Interesting: Free IT Magazines  
Home > Archive > Apache Mod-Python > August 2005 > Commented: (MODPYTHON-72) mod_python.publisher no longer pays attention to result of r





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Commented: (MODPYTHON-72) mod_python.publisher no longer pays attention to result of r
Graham Dumpleton (JIRA)

2005-08-27, 7:46 am

[ http://issues.apache.org/jira/brows...action_12320249 ]

Graham Dumpleton commented on MODPYTHON-72:
-------------------------------------------

Another bug in this new publisher code is that when SetHandler is used, in 3.1.3
it would only pay attention to files matched which had a ".py" extension. Actually
it would match anything returned by imp.get_suffixes(), but then it had some subtle
bugs in that as well, as described in MODPYTHON-22.

This all mean't that if you had "page.py" and "page.html" in a directory together and
you access "page.html" it would return not found. In the new publisher it attempts to
load the "page.html" file as Python code, which yields a syntax error like:

File "/Users/grahamd/Sites/mp32/page.html", line 1


^

SyntaxError: invalid syntax

> mod_python.publisher no longer pays attention to result of req.get_addhandler_exts()
> ------------------------------------------------------------------------------------
>
> Key: MODPYTHON-72
> URL: http://issues.apache.org/jira/browse/MODPYTHON-72
> Project: mod_python
> Type: Bug
> Versions: 3.2.0
> Reporter: Nicolas Lehuen
> Assignee: Nicolas Lehuen


>
> Says Graham :
> A final issue, is that latest mod_python.publisher no longer pays
> attention to result of req.get_addhandler_exts(). This means that where
> you used to be able to say:
> # .htaccess
> AddHandler mod_python .html
> PythonHandler mod_python.publisher
> # page.py
> def index():
> return "<html></body><p>XXX</p></body></html>"
> with URL of "/page.html", this no longer appears to work for me. In
> short it appears that one can only use ".py" as an extension or no
> extension at all. Defining another extension to AddHandler or
> PythonHandler seems to have no effect.


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com