add config and docs for limits

This commit is contained in:
David Lord 2024-11-01 13:13:05 -07:00
parent 62c56e08c4
commit c7a53888a1
No known key found for this signature in database
GPG key ID: 43368A7AA8CC5926
7 changed files with 231 additions and 33 deletions

View file

@ -1538,27 +1538,6 @@ def test_werkzeug_passthrough_errors(
app.run(debug=debug, use_debugger=use_debugger, use_reloader=use_reloader)
def test_max_content_length(app, client):
app.config["MAX_CONTENT_LENGTH"] = 64
@app.before_request
def always_first():
flask.request.form["myfile"]
AssertionError()
@app.route("/accept", methods=["POST"])
def accept_file():
flask.request.form["myfile"]
AssertionError()
@app.errorhandler(413)
def catcher(error):
return "42"
rv = client.post("/accept", data={"myfile": "foo" * 100})
assert rv.data == b"42"
def test_url_processors(app, client):
@app.url_defaults
def add_language_code(endpoint, values):