From f9452c011454f590c47efb4bdfdbf9d5e94bbe51 Mon Sep 17 00:00:00 2001 From: malwaredllc <30509968+malwaredllc@users.noreply.github.com> Date: Wed, 5 Jan 2022 12:56:53 -0700 Subject: [PATCH] improve comments for no_auto_head option --- src/flask/app.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/flask/app.py b/src/flask/app.py index 6049df1d..7cf84e92 100644 --- a/src/flask/app.py +++ b/src/flask/app.py @@ -1083,9 +1083,10 @@ class Flask(Scaffold): rule = self.url_rule_class(rule, methods=methods, **options) rule.provide_automatic_options = provide_automatic_options # type: ignore - # If GET is only specified method, Werkzeug automatically adds HEAD method. - # This option will disable that feature to allow the user to write their - # own handling for HEAD. + # When GET is only specified method, Werkzeug automatically adds HEAD method. + # If GET is the only user-specified method and the ``no_auto_head`` option + # is to True, this will disable that feature to allow the user to write their + # own handling for HEAD requests. only_get = methods == {"GET", "OPTIONS"} if only_get and no_auto_head is True: