From f99740ecba6fffc413cf4d0ddf6207049c7df9e3 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone <exarkun@twistedmatrix.com> Date: Wed, 9 Sep 2020 09:49:15 -0400 Subject: [PATCH] Just go with BAD_REQUEST --- src/_zkapauthorizer/resource.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/_zkapauthorizer/resource.py b/src/_zkapauthorizer/resource.py index fae91cd..96dc29d 100644 --- a/src/_zkapauthorizer/resource.py +++ b/src/_zkapauthorizer/resource.py @@ -40,7 +40,6 @@ from twisted.logger import ( ) from twisted.web.http import ( BAD_REQUEST, - NOT_ALLOWED, ) from twisted.web.server import ( NOT_DONE_YET, @@ -277,7 +276,7 @@ def wrong_content_type(request, required_type): [None], )[0] if actual_type != required_type: - request.setResponseCode(NOT_ALLOWED) + request.setResponseCode(BAD_REQUEST) request.finish() return True return False -- GitLab