title: Simple Flask app and Bad HTTP/0.9 request type over time
body: <p>I wrote simple flask application like here: <a href="http://flask.pocoo.org/docs/quickstart/" rel="nofollow">http://flask.pocoo.org/docs/quickstart/</a> It's really minimalistic, has only three pages and login form. And I run this application on my own computer. Sometimes over the day i get this:</p>
  
  <pre><code>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 -
  </code></pre>
  
  <p>My index function is here:</p>
  
  <pre><code>@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')
  </code></pre>
  
  <p>Sometimes server is not responding and I must restart app. Can someone help me?</p>