Cannot pass digest authentication

I am implementing digest authentication. I copied example of
authenticate_or_request_with_http_digest and tried different approaches
but I couldn’t pass the authentication. I always get 401 Unauthorized.

My code exactly from example.

Debugger shows that browser generated response and expected results do
not match although all fields look OK.

Please help. It’s urgent.
=> Booting WEBrick
=> Rails 2.3.2 application starting on http://0.0.0.0:3000
** [NewRelic] NewRelic Agent Developer Mode enabled.
** [NewRelic] To view performance information, go to
http://localhost:3000/newrelic
** [NewRelic] New Relic RPM Agent 2.9.4 Initialized: pid = 7108
** [NewRelic] Agent Log found in
F:/RoR/dev/society/log/newrelic_agent.log
[2010-07-13 23:48:48] INFO WEBrick 1.3.1
[2010-07-13 23:48:48] INFO ruby 1.8.6 (2008-08-11) [i386-mswin32]
=>