Skip to content

Commit

Permalink
Applied a patch from ibc: DigestAuth header quotation error: closes #27.
Browse files Browse the repository at this point in the history
qup and algorithm is not required to be quoted. RFC2617 includes an
example 'qop="auth,auth-int"' though...
  • Loading branch information
Hiroshi Nakamura committed Dec 12, 2010
1 parent 8aa3a34 commit 6f48800
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/httpclient/auth.rb
Expand Up @@ -345,9 +345,9 @@ def calc_cred(req, user, passwd, param)
header << "uri=\"#{path}\""
header << "cnonce=\"#{cnonce}\""
header << "nc=#{'%08x' % @nonce_count}"
header << "qop=\"#{param['qop']}\""
header << "qop=#{param['qop']}"
header << "response=\"#{Digest::MD5.hexdigest(message_digest.join(":"))}\""
header << "algorithm=\"MD5\""
header << "algorithm=MD5"
header << "opaque=\"#{param['opaque']}\"" if param.key?('opaque')
header.join(", ")
end
Expand Down

0 comments on commit 6f48800

Please sign in to comment.