This project is archived and is in readonly mode.

#5636 ✓resolved
Seth Ladd

head method attempts to camelcase headers

Reported by Seth Ladd | September 15th, 2010 @ 11:05 PM | in 3.0.2

I am using Rails 3 on Ruby 1.9.2.

This call:

head 401, 'WWW-Authenticate' => Rack::OpenID.build_header(:identifier => params[:openid_identifier])

actually returns:

"{"Www-Authenticate"=>"OpenID identifier=\"https://www.google.com/accounts/o8/id\"", "Content-Type"=>"text/html; charset=utf-8", "Cache-Control"=>"no-cache"}"

Notice the "Www-Authenticate" which of course does not work with rack-openid, which is correctly looking for WWW-Authenticate.

This call:

  response.headers['WWW-Authenticate'] = Rack::OpenID.build_header(:identifier => params[:openid_identifier])
  head 401

correctly sets the header and does not change the case of the letters.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Referenced by

Pages