[jira] Resolved: (MODPYTHON-82) mod_python.publisher cache will not work if threading not built into Python
[ http://issues.apache.org/jira/browse/MODPYTHON-82?page=all ] Nicolas Lehuen resolved MODPYTHON-82: - Fix Version: 3.2.0 Resolution: Fixed Assign To: Nicolas Lehuen Ooops, my bad, sorry ! This is fixed now. > mod_python.publisher cache will not work if threading not built into Python > --- > > Key: MODPYTHON-82 > URL: http://issues.apache.org/jira/browse/MODPYTHON-82 > Project: mod_python > Type: Bug > Components: publisher > Versions: 3.2.0 > Environment: Python --without-threads > Reporter: Graham Dumpleton > Assignee: Nicolas Lehuen > Fix For: 3.2.0 > > The mod_python.cache module will not work if threads are not built into > Python. > Mod_python error: "PythonHandler mod_python.publisher" > Traceback (most recent call last): > File > "/home/grahamd/testing/lib/python2.3/site-packages/mod_python/apache.py", > line 287, in HandlerDispatch > log=debug) > File > "/home/grahamd/testing/lib/python2.3/site-packages/mod_python/apache.py", > line 461, in import_module > module = imp.load_module(mname, f, p, d) > File > "/home/grahamd/testing/lib/python2.3/site-packages/mod_python/publisher.py", > line 50, in ? > from cache import ModuleCache, NOT_INITIALIZED > File > "/home/grahamd/testing/lib/python2.3/site-packages/mod_python/cache.py", line > 23, in ? > from threading import Lock > File "/home/grahamd/testing/lib/python2.3/threading.py", line 6, in ? > import thread > ImportError: No module named thread > Instead of the code: > from threading import Lock > It should use: > try: > from threading import Lock > except: > class Lock: > def acquire(self): pass > def release(self): pass -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
Re: [jira] Created: (MODPYTHON-82) mod_python.publisher cache will not work if threading not built into Python
Instead of the code: from threading import Lock It should use: try: from threading import Lock except: class Lock: def acquire(self): pass def release(self): pass I suggest: try: from threading import Lock except: from dummy_threading import Lock Nick
[jira] Created: (MODPYTHON-84) req.sendfile(filename) sends an incorrect number of bytes when filename is a symlink
req.sendfile(filename) sends an incorrect number of bytes when filename is a symlink Key: MODPYTHON-84 URL: http://issues.apache.org/jira/browse/MODPYTHON-84 Project: mod_python Type: Bug Components: core Versions: 3.1.4, 3.1.3, 3.2.0 Reporter: Jim Gallacher Assigned to: Jim Gallacher This issue was reported by Wim Heirman on the mod_python list: When req.sendfile(filename) is called where filename is a symbolic link, only part of the file is sent to the client (as many bytes as there are characters in the symlink's file reference, so for a symlink pointing to '../index.html' returns the first 13 bytes of the correct file). Wim suggested changing APR_READ to APR_FINFO_NORM in the apr_stat call in req_sendfile(). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Work started: (MODPYTHON-84) req.sendfile(filename) sends an incorrect number of bytes when filename is a symlink
[ http://issues.apache.org/jira/browse/MODPYTHON-84?page=all ] Work on MODPYTHON-84 started by Jim Gallacher > req.sendfile(filename) sends an incorrect number of bytes when filename is a > symlink > > > Key: MODPYTHON-84 > URL: http://issues.apache.org/jira/browse/MODPYTHON-84 > Project: mod_python > Type: Bug > Components: core > Versions: 3.1.4, 3.1.3, 3.2.0 > Reporter: Jim Gallacher > Assignee: Jim Gallacher > > This issue was reported by Wim Heirman on the mod_python list: > When req.sendfile(filename) is called where filename is a symbolic link, only > part of the file is sent to the client (as many bytes as there are characters > in the symlink's file reference, so for a symlink pointing to '../index.html' > returns the first 13 bytes of the correct file). > Wim suggested changing APR_READ to APR_FINFO_NORM in the apr_stat call in > req_sendfile(). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Resolved: (MODPYTHON-67) Make req.path_info writable.
[ http://issues.apache.org/jira/browse/MODPYTHON-67?page=all ] Jim Gallacher resolved MODPYTHON-67: Fix Version: 3.2.0 Resolution: Fixed I'm not sure why this was not marked as resolved earlier, but the fix has been committed so I'm marking this issue as resolved. > Make req.path_info writable. > > > Key: MODPYTHON-67 > URL: http://issues.apache.org/jira/browse/MODPYTHON-67 > Project: mod_python > Type: New Feature > Components: core > Versions: 3.2.0 > Reporter: Graham Dumpleton > Fix For: 3.2.0 > Attachments: requestobject.c.diff > > In current version of mod_python req.filename is writable, but > req.path_info isn't. > If req.path_info were writable it would more easily allow a middleware > stack to be implemented in mod_python. This is because a middleware > component could modify req.path_info as necessary as the path info is > progressively processed. This would be better than a middleware > component having to create a parallel request attribute just for this > purpose as by being able to change req.path_info existing handlers such > as mod_python.publisher which already look at req.filename and > req.path_info could still be utilised in various ways within the > middleware stack. Same for any handlers which third parties may have > developed. Thus would eliminate the need to copy existing handlers and > modify them to get them to work, a middleware component would simply > need to setup req.filename and req.path_info as appropriate and the > existing handlers would work unmodified. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira