title: Rack::SSL giving "ERROR bad Request-Line"
body: <p>I am using Rack::SSL in my Rails 3.1 application to enable SSL connections.</p>
  
  <p>I've added <code>gem 'rack-ssl'</code> to my Gemfile and </p>
  
  <pre><code>require 'rack/ssl'
  config.middleware.insert_before ActionDispatch::Static, Rack::SSL, :exclude =&gt; proc { |env| env['HTTPS'] != 'on' }
  </code></pre>
  
  <p>to my environment configuration.</p>
  
  <p>Accessing a resource over HTTP works fine, while using HTTPS for the same resource results in </p>
  
  <pre><code>[2012-02-04 02:18:32] WARN  Could not determine content-length of response body. Set content-length of the response or set Response#chunked = true
  [2012-02-04 02:18:35] ERROR bad Request-Line `\x16\x03\x01\x00?\x01\x00\x00?\x03\x01O,?m9?D??Puo'?w8r?U\x17RO?r????C?Q#\x00\x006?'.
  [2012-02-04 02:18:35] ERROR bad Request-Line `\x16\x03\x00\x00A\x01\x00\x00=\x03\x00O,?mS67"?q???(T?27\x18B????C\x19?*B?\x00\x00\x16\x00/\x00\x05\x00\x04\x005\x00'.
  [2012-02-04 02:18:37] ERROR bad Request-Line `\x16\x03\x00\x00A\x01\x00\x00=\x03\x00O,?oG\x18??%\eJ?n\x1Czt'V?5?B?3?1???Џ?\x00\x00\x16\x00/\x00\x05\x00\x04\x005\x00'.
  [2012-02-04 02:18:38] ERROR bad Request-Line `\x16\x03\x00\x00A\x01\x00\x00=\x03\x00O,?p+EPU\x0F?\x00??/,?X?"@4}?ބE?c?o+?\x00\x00\x16\x00/\x00\x05\x00\x04\x005\x00'.
  </code></pre>
  
  <p>Any ideas what might cause this behaviour?</p>