'Dispatches the WSGI request'

def dispatch(self, env, start_response):

    if (not _validate_origin(env)):
        start_response('403    Invalid    Origin', [])
        return ''
    context = HttpContext(env, start_response)
    for middleware in self.stack:
        output = middleware.handle(context)
        if (output is not None):
            return output
