set response.code=200 as soon as we know there's a hook waiting for it

This commit is contained in:
jesopo 2019-09-10 13:45:14 +01:00
parent fefb9d71fb
commit 4a08c2d134

View file

@ -90,6 +90,7 @@ class Handler(http.server.BaseHTTPRequestHandler):
hooks = _events.on("api").on(method).on(endpoint).get_hooks()
if hooks:
response.code = 200
hook = hooks[0]
authenticated = hook.get_kwarg("authenticated", True)
key = params.get("key", None)