+# -*- python -*-
#
# Apache mod_wsgi python interface
#
from PLC.Debug import log
from PLC.API import PLCAPI
-api = PLCAPI()
-
def application(environ, start_response):
try:
status = '200 OK'
</body></html>
"""
else:
+ # Thomas Dreibholz <dreibh@simula.no>
+ # Note that this function is called within multiple threads!
+ # "api" MUST be a local variable instead of a global one.
+ # Otherwise, this causes concurrent accesses to the same
+ # object within different threads!
+ api = PLCAPI()
api.environ = environ
content_type = 'text/xml'
ip = environ.get('REMOTE_ADDR')