From 2971c71fc7954d0d782150f40875bdeb225629e6 Mon Sep 17 00:00:00 2001 From: malwaredllc <30509968+malwaredllc@users.noreply.github.com> Date: Wed, 5 Jan 2022 12:49:50 -0700 Subject: [PATCH] make no_auto_head comparison more explicit --- src/flask/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flask/app.py b/src/flask/app.py index 1dec5d6d..6049df1d 100644 --- a/src/flask/app.py +++ b/src/flask/app.py @@ -1088,7 +1088,7 @@ class Flask(Scaffold): # own handling for HEAD. only_get = methods == {"GET", "OPTIONS"} - if only_get and no_auto_head is not None: + if only_get and no_auto_head is True: rule.methods.discard("HEAD") # type: ignore self.url_map.add(rule)