Changeset 4

Show
Ignore:
Timestamp:
03/01/06 12:51:44 (3 years ago)
Author:
Jan-Klaas Kollhof
Message:

fixed apache handler to allow services being request to have any file extension, the impl. of the service though must have a .py extension

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/jsonrpc/apacheServiceHandler.py

    r3 r4  
    3838def handler(req):     
    3939    (modulePath, fileName) = os.path.split(req.filename) 
     40    (moduleName, ext) = os.path.splitext(fileName) 
    4041     
    41     if not os.path.exists(req.filename): 
     42    if not os.path.exists(os.path.join(modulePath,moduleName + ".py")): 
    4243        return apache.HTTP_NOT_FOUND 
    4344         
    4445    if not modulePath in sys.path: 
    4546        sys.path.insert(0, modulePath) 
    46      
    47     #os.chdir(modulePath) 
    48      
    49     (moduleName, ext) = os.path.splitext(fileName) 
    5047     
    5148    module = apache.import_module(moduleName, log=1)