lib/rufus/verbs/digest.rb in rufus-verbs-1.0.0 vs lib/rufus/verbs/digest.rb in rufus-verbs-1.0.1

- old
+ new

@@ -1,7 +1,7 @@ #-- -# Copyright (c) 2008-2010, John Mettraux, jmettraux@gmail.com +# Copyright (c) 2008-2012, John Mettraux, jmettraux@gmail.com # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell @@ -108,10 +108,12 @@ op = opts.dup 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 res = request(method, op) @@ -140,10 +142,10 @@ @nonce_count += 1 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) else h(user, realm, pass)