Permalink
Browse files

Merge pull request #4 from catwell/master

Fix Digest authentication
  • Loading branch information...
2 parents 090445e + 670cfbb commit 11abb7f11949c31b574d3e3597091c16dd48e535 @jmettraux jmettraux committed Jan 24, 2012
Showing with 4 additions and 2 deletions.
  1. +1 −1 Rakefile
  2. +3 −1 lib/rufus/verbs/digest.rb
View
@@ -1,6 +1,6 @@
-require 'lib/rufus/verbs/version.rb'
+require './lib/rufus/verbs/version.rb'
require 'rubygems'
require 'rake'
@@ -110,6 +110,8 @@ def request_challenge (req, opts)
op[:digest_authentication] = false
# preventing an infinite loop
+ op[:body] = false
+ # we want to check the error code
method = req.class.const_get(:METHOD).downcase.to_sym
#method = :get
@@ -142,7 +144,7 @@ def generate_header (req, opts)
user, pass = o(opts, :digest_authentication)
realm = @challenge.realm || ""
method = req.class.const_get(:METHOD)
- path = opts[:path]
+ path = req.path
a1 = if @challenge.algorithm == 'MD5-sess'
h(h(user, realm, pass), @challenge.nonce, @cnonce)

0 comments on commit 11abb7f

Please sign in to comment.