# File lib/rack/auth/digest/md5.rb, line 33
33:         def call(env)
34:           auth = Request.new(env)
35: 
36:           unless auth.provided?
37:             return unauthorized
38:           end
39: 
40:           if !auth.digest? || !auth.correct_uri? || !valid_qop?(auth)
41:             return bad_request
42:           end
43: 
44:           if valid?(auth)
45:             if auth.nonce.stale?
46:               return unauthorized(challenge(:stale => true))
47:             else
48:               env['REMOTE_USER'] = auth.username
49: 
50:               return @app.call(env)
51:             end
52:           end
53: 
54:           unauthorized
55:         end