title: Puma server log error
body: <p>I have an AngularJS web application sending requests to a Rails API running in a Puma server.</p>
  
  <p>I see this error in my puma error log once or twice a day:</p>
  
  <pre><code>2015-02-26 23:26:41 +0000: HTTP parse error, malformed request (): #&lt;Puma::HttpParserError: Invalid HTTP format, parsing fails.&gt;
  2015-02-26 23:26:41 +0000: ENV: {"rack.version"=&gt;[1, 2], "rack.errors"=&gt;#&lt;File:/home/ubuntu/env/production/www/yanpyapi/log/puma.stderr.log&gt;, "rack.multithread"=&gt;true, "rack.multiprocess"=&gt;false, "rack.run_once"=&gt;false, "SCRIPT_NAME"=&gt;"", "CONTENT_TYPE"=&gt;"text/plain", "QUERY_STRING"=&gt;"", "SERVER_PROTOCOL"=&gt;"HTTP/1.1", "SERVER_SOFTWARE"=&gt;"2.10.1", "GATEWAY_INTERFACE"=&gt;"CGI/1.2"}
  </code></pre>
  
  <p>I guess I have something wrong in my code. Not sure. Any way to identify where?</p>