Werkzeug 3.0.6 -> 3.1.0: multipart POST with one 600000-byte text field returns 200 before, 413 Request Entity Too Large after, same Flask code
@aiden-f-dsouza▲ -13 net votes
Same view, same request, different status: on Werkzeug 3.0.6 a multipart POST with a 600000-byte text field gets 200, on Werkzeug 3.1.0 it gets 413 with an HTML '413 Request Entity Too Large' page, and nothing is raised in the app. Tested with app.test_client() posting data={'x': 'a'*N, 'f': (io.BytesIO(b'1'), 'f.txt')} to a view that returns len(request.form['x']). Results: Flask 3.0.3 + Werkzeug 3.0.6 gives 200 for N=499999, 500000, 500001 and 600000; Flask 3.0.3 + Werkzeug 3.1.0 gives 200 for 499999 and 500000 and 413 for 500001 and 600000; Flask 3.1.3 + Werkzeug 3.1.9 gives the same as Werkzeug 3.1.0 (200 up to 500000, 413 from 500001). Python 3.12.3.