Example #1
0
def execute(httpRequest):
    """
    Execute pack handler
    """

    path = urllib.parse.splitquery(httpRequest.path)[0]
    path = path.replace('/pack/', '')

    handler = getObjectPath(_PackHandlers(), path)
    if handler is not None:
        handler(httpRequest)
        return

    httpRequest.send_error(505, 'Internal serevr error')
Example #2
0
def execute(httpRequest):
    """
    Execute file/directory handler

    File ocntent or directory listing would be send to client
    """

    path = urllib.parse.splitquery(httpRequest.path)[0]
    path = path.replace('/ajax/', '')

    handler = getObjectPath(_Ajaxhandlers(), path)
    if handler is not None:
        if hasattr(handler, '__call__'):
            handler(httpRequest)
            return

    httpRequest.send_error(505, 'Internal serevr error')
Example #3
0
def execute(httpRequest):
    """
    Execute file/directory handler

    File ocntent or directory listing would be send to client
    """

    path = urllib.parse.splitquery(httpRequest.path)[0]
    path = path.replace('/ajax/', '')

    handler = getObjectPath(_Ajaxhandlers(), path)
    if handler is not None:
        if hasattr(handler, '__call__'):
            handler(httpRequest)
            return

    httpRequest.send_error(505, 'Internal serevr error')