Flask resets the connection instead of returning a 413, when the file is to big
问题 When MAX_CONTENT_LENGTH is definded, Flask should return an 413, but in my case it resets the connection with this error: Error 101 (net::ERR_CONNECTION_RESET): The connection was reset. I attached a example built upon the file upload pattern from Flask. I use Chrome 15.0.874.5. import os from flask import Flask, request, redirect, url_for, send_from_directory from werkzeug import secure_filename UPLOAD_FOLDER = 'uploads/' ALLOWED_EXTENSIONS = set(['txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif',