librelist archives

« back to archive

Unable to read form data on POST

Unable to read form data on POST

From:
Sean Lynch
Date:
2012-07-19 @ 14:37
Not sure when this issue started, but whenever I try to read from
`request.form`, I get the following error:

TypeError: stream not limited and no limit provided.


Here is a limited test case that causes the error.

# View
@app.route("/test", methods=["GET", "POST"])
@templated()
def test():
    if request.method == "POST":
        form = request.form

# Template
    <form method="post" action="{{ url_for(".test") }}"
class="form-vertical">
        <div class="form-actions">
            <button type="submit" class="btn btn-primary">Save</button>
        </div>
    </form>

I was on Flask 0.9, but went back to 0.8, which is also experiencing the
issue.  I can provide a full stack trace if it would help.  I'm using the
Flask dev server (app.run).