From f61369dbf019c0329e2b4fb5297f971a1a182e46 Mon Sep 17 00:00:00 2001 From: i-rus Date: Sat, 16 Nov 2013 13:47:04 -0800 Subject: [PATCH] Update digest_auth.rb The nonce_count for the first authorization request should be 1. Currently 0 is used, which fails causes the authentication to fail with some servers (e.g. Node.js). This changes the initial nonce_count value to 0 so that the value used for the first request will be 1. --- lib/net/http/digest_auth.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/net/http/digest_auth.rb b/lib/net/http/digest_auth.rb index 080f286..f691cfa 100644 --- a/lib/net/http/digest_auth.rb +++ b/lib/net/http/digest_auth.rb @@ -56,7 +56,7 @@ class Error < RuntimeError; end def initialize ignored = :ignored mon_initialize - @nonce_count = -1 + @nonce_count = 0 end ##