title: Testing basic http authenticaation with digest using curl
body: <p>How can we test authentication with digest as explained <a href="http://api.rubyonrails.org/classes/ActionController/HttpAuthentication/Basic.html#label-Simple+Digest+example">here</a> using curl?</p>
  
  <p>I am able to test <a href="http://api.rubyonrails.org/classes/ActionController/HttpAuthentication/Basic.html#label-Simple+Basic+example">Simple Basic</a> example by setting <code>Authorization</code> header to <code>Basic {SECRET}</code> where <code>SECRET</code> is <code>Base64::encode64("username:password")</code> as explained <a href="http://apidock.com/rails/ActionController/HttpAuthentication/Basic/ControllerMethods/authenticate_or_request_with_http_basic#197-Testing-protected-controllers">here</a></p>
  
  <p>I tried sending <code>Authentication</code> header with same value but getting <code>NoMethodError (undefined method 'unpack' for nil:NilClass)</code> on line having call <code>authenticate_or_request_with_http_digest</code></p>
  
  <p>Would anyone please explain what I am doing wrong here?</p>