私は以下のような単純なフラスコ アプリケーションを作成しました: http://flask.pocoo.org/docs/quickstart/本当に最小限で、3 つのページとログイン フォームしかありません。そして、このアプリケーションを自分のコンピューターで実行します。時々私はこれを得る:
178.93.*.* - - [27/Jun/2013 07:28:45] code 400, message Bad HTTP/0.9 request type ('\x99L\xe6\x1f\x9a\xbb\x8d\xea\x1d\xfa\x96_\x8e\x88\xc1\xfc_q\x8d:h\x88\x12\xda\xcb\x1a4X\xa7\xe3;\x1e\x1a\xd1w')
178.93.*.* - - [27/Jun/2013 07:28:45] "�L�������_��_q�:h���4X��;�w ���|G�(+��g��(RhԱ����" 400 -
私のインデックス関数はここにあります:
@app.route('/', methods=['GET', 'POST'])
def index():
if request.method == 'POST':
if database.get_user(request.form['login']):
session['username'] = request.form['login']
return redirect(url_for('list_site'))
elif request.form['login'] == app.config['USERNAME']:
if request.form['password'] == app.config['PASSWORD']:
session['logged_in_admin'] = True
return redirect(url_for('admin_site'))
return render_template('index.html')
サーバーが応答しない場合があり、アプリを再起動する必要があります。誰かが私を助けることができますか?