Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #9747: force_browser_to_send_http_auth_in_utf-8_patch.diff

File force_browser_to_send_http_auth_in_utf-8_patch.diff, 0.7 kB (added by boof, 1 year ago)

sends accept-charset header before auth request is send

  • /Users/boof/projects/robee/vendor/rails/actionpack/lib/action_controller/http_authentication.rb

    old new  
    120120      end 
    121121 
    122122      def authentication_request(controller, realm) 
     123        controller.headers["Accept-Charset"] = 'UTF-8' 
    123124        controller.headers["WWW-Authenticate"] = %(Basic realm="#{realm.gsub(/"/, "")}") 
    124125        controller.send! :render, :text => "HTTP Basic: Access denied.\n", :status => :unauthorized 
    125126        return false