title: Accessing headers from Sinatra
body: <p>I am trying to access the headers in a filter in sinatra. My request includes the header "HTTP_AUTH", however I can't access it. My filter is</p>
  
  <pre><code>before do
      halt 403 unless request['HTTP_AUTH'] == 'test'
  end
  </code></pre>
  
  <p>It works correctly from my rack test.</p>
  
  <pre><code>browser.get '/mypath', "CONTENT_TYPE" =&gt; "application/json", "HTTP_AUTH" =&gt; 'test'
  </code></pre>
  
  <p>But when I try from other sources I can't access it. If I <code>puts request.env</code> I can see the token is in the request, but I can't access it. </p>
  
  <pre><code>"HTTP_CONNECTION"=&gt;"close", 
  "HTTP_AUTH"=&gt;"test", 
  "HTTP_ACCEPT"=&gt;"application/json", 
  </code></pre>
  
  <p>What am I doing wrong?</p>