Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Improve parameter name

  • Loading branch information...
commit edb9df0cbb4843b28f20c53de2affdb61b3b96ff 1 parent 598fe3e
@drbrain authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/net/http/digest_auth.rb
View
8 lib/net/http/digest_auth.rb
@@ -26,8 +26,8 @@ def initialize cnonce = make_cnonce
end
##
- # Creates a digest auth header for +uri+ from +auth_header+ for HTTP method
- # +method+.
+ # Creates a digest auth header for +uri+ from the +www_authenticate+ header
+ # for HTTP method +method+.
#
# The result of this method should be sent along with the HTTP request as
# the "Authorization" header. In Net::HTTP this will look like:
@@ -39,13 +39,13 @@ def initialize cnonce = make_cnonce
# IIS servers handle the "qop" parameter of digest authentication
# differently so you may need to set +iis+ to true for such servers.
- def auth_header uri, auth_header, method, iis = false
+ def auth_header uri, www_authenticate, method, iis = false
@nonce_count += 1
user = CGI.unescape uri.user
password = CGI.unescape uri.password
- auth_header =~ /^(\w+) (.*)/
+ www_authenticate =~ /^(\w+) (.*)/
params = {}
$2.gsub(/(\w+)="(.*?)"/) { params[$1] = $2 }
Please sign in to comment.
Something went wrong with that request. Please try again.