title: "Poorly formatted HTTP response" in ruby on rails app in heroku
body: <p>Our Production(SquareOff) and Staging(so-staging) App suddenly facing a terrible issue. The issue is when we send request to the app it failed to response. The response log is bellow:</p>
  
  <blockquote>
    <p>2015-05-14T06:48:02.236633+00:00 heroku[router]: http_error="Invalid HTTP status line" at=error code=H17 desc="Poorly formatted HTTP response" method=POST path="/users/invitation" host=so-staging.herokuapp.com request_id=01f23953-580c-484a-9d6b-89ff19d70b2b fwd="203.202.242.130" dyno=web.1 connect=0ms service=1049ms status=503 bytes=755</p>
  </blockquote>
  
  <p>However, sometimes it works perfectly. The response log is bellow for this scenario:</p>
  
  <blockquote>
    <p>2015-05-14T06:43:10.129616+00:00 heroku[router]: at=info method=POST path="/users/invitation" host=so-staging.herokuapp.com request_id=cb961af7-c249-4705-8ed0-226fad76e6ab fwd="203.202.242.130" dyno=web.1 connect=1ms service=1362ms status=302 bytes=1317</p>
  </blockquote>
  
  <p>Also i found this link that discuss about this issue. <a href="https://github.com/xyu/heroku-wp/issues/3" rel="nofollow">https://github.com/xyu/heroku-wp/issues/3</a> but the solution is really bad and don't acceptable.</p>
  
  <p>I appreciate help regarding how to fix this issue.</p>