1、The browser (or proxy) sent a request that this server could not understand. (self.flask)
if request.method == 'GET': referrer = request.args.get('next', '/') return render_template("login.html", next=referrer)elif request.method == 'POST':
解决:
i think the real issue is how your accessing your form data, if you say
post.text = request.form['body']
or w/e, and there isnt any data in form body, you get that error
to fix, access like this
post.text = request.form.get('body','')
which provides a sane default for cases where form['body'] is empty
make sure to do the same with request.form['title']
https://www.reddit.com/r/flask/comments/2tdxas/af_the_browser_or_proxy_sent_a_request_that_this/?st=j0kb98k5&sh=d28ae010