Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

flask.views.MethodView returns the response body for HEAD #566

Closed
jakub- opened this Issue · 2 comments

3 participants

@jakub-

See https://github.com/mitsuhiko/flask/blob/master/flask/views.py#L148.

When there's no HEAD handler, it uses the GET one but doesn't actually discard the response body, which it should. Most HTTP clients ignore it anyway so this should be safe to fix.

@untitaker
Collaborator

Sorry if i am wrong, since i don't have much experience with Flask's sourcecode, but couldn't the GET method not just discard the response body (for HEAD requests)?

@mitsuhiko
Owner

That should not happen as Werkzeug is taking care of that when yielding to the WSGI server: https://github.com/mitsuhiko/werkzeug/blob/master/werkzeug/wrappers.py#L1025

@mitsuhiko mitsuhiko closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.