uv-rays 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 058dd2e60b392b41bd8138d396022069f087f730
4
- data.tar.gz: 3ba1ec427f37ccbc321c38cd1cd6ed7021dbfaf4
3
+ metadata.gz: 4e0ed8546ca888cff20ded4605bd07311bcce602
4
+ data.tar.gz: 9752390a4161b472d39fb9a3d5d34abb72ff690d
5
5
  SHA512:
6
- metadata.gz: f4d0275064097f22c4b3a955f55874ede3735dd7315bd120d2a0b01ad89c497af88523a516df2d9ac2b984295ff907fb1174b2c7c90120f266a6699278318227
7
- data.tar.gz: 35110447fbce49124c2f5592d9caa35e8e17368f6a1831084213131ad3dbd106f39edae90c395ead4d3e3f7968d638e871445cb31c7a6f2b6af2650daa124b82
6
+ metadata.gz: b03214fac41e0522af1674774306d7c2ae705f62a376ec6175b49927ae29887d29dfdd33f5b128aa4b09bc3422a5fcca8e195172130583bb7597001a99501fe1
7
+ data.tar.gz: 1fb5c2a2cd90ecbb2856826e8d3bdcf1c2ff87621d50f393176a4dd06d6f7f33680a5082550f70b68513a266839138f4b06b55f8d331189fb5450be550037700
@@ -36,13 +36,17 @@ module UV
36
36
  end
37
37
 
38
38
  def resolve(response, body)
39
- if @ntlm_retries && @headers.status == 401 && @headers[:"WWW-Authenticate"] && @ntlm_retries < 3
39
+ if @ntlm_retries == 0 && @headers.status == 401 && @headers[:"WWW-Authenticate"]
40
40
  @options[:headers][:Authorization] = @endpoint.ntlm_auth_header(@headers[:"WWW-Authenticate"])
41
41
  @ntlm_retries += 1
42
42
 
43
43
  response.request = self
44
44
  execute(*@exec_params)
45
45
  else
46
+ if @ntlm_retries == 1
47
+ @endpoint.clear_ntlm_header
48
+ end
49
+
46
50
  @exec_params = nil
47
51
  @defer.resolve({
48
52
  headers: @headers,
@@ -178,6 +178,7 @@ module UV
178
178
 
179
179
  def on_close
180
180
  @closed = true
181
+ @ntlm_auth = nil
181
182
  clear_staging = @connecting == @staging_request
182
183
  @connecting = false
183
184
  stop_timer
@@ -262,7 +263,7 @@ module UV
262
263
  scheme, param_str = parse_ntlm_challenge_header(challenge)
263
264
  if param_str.nil?
264
265
  @ntlm_auth = nil
265
- return ntlm_auth_header(creds)
266
+ return ntlm_auth_header(@ntlm_creds)
266
267
  else
267
268
  t2 = Net::NTLM::Message.decode64(param_str)
268
269
  t3 = t2.response(@ntlm_creds, ntlmv2: true)
@@ -278,6 +279,10 @@ module UV
278
279
  end
279
280
  end
280
281
 
282
+ def clear_ntlm_header
283
+ @ntlm_auth = nil
284
+ end
285
+
281
286
 
282
287
  protected
283
288
 
@@ -1,3 +1,3 @@
1
1
  module UV
2
- VERSION = '1.2.2'
2
+ VERSION = '1.2.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uv-rays
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen von Takach
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-05 00:00:00.000000000 Z
11
+ date: 2016-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: libuv