This repository was archived by the owner on Oct 3, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1320,7 +1320,7 @@ class SocketFetch extends ArcEventSource {
13201320 } else if ( status === 401 ) {
13211321 if ( this . _connection . headers . has ( 'www-authenticate' ) ) {
13221322 let authHeader = this . _connection . headers . get ( 'www-authenticate' ) ;
1323- if ( authHeader . toLowerCase ( ) . indexOf ( 'digest' ) ) {
1323+ if ( authHeader . toLowerCase ( ) . indexOf ( 'digest' ) !== - 1 ) {
13241324 this . handleDigestResponse ( authHeader ) ;
13251325 }
13261326 }
@@ -1376,7 +1376,7 @@ class SocketFetch extends ArcEventSource {
13761376 handleDigestResponse ( digestHeaders ) {
13771377 digestHeaders = digestHeaders . slice ( digestHeaders . indexOf ( ':' ) + 1 , - 1 ) ;
13781378 digestHeaders = digestHeaders . split ( ',' ) ;
1379- this . auth = new DigestAuth ( ) ;
1379+ this . auth = new DigestAuth ( { } ) ;
13801380 this . auth . method = 'digest' ;
13811381 this . auth . scheme = digestHeaders [ 0 ] . split ( / \s / ) [ 1 ] ;
13821382 for ( var i = 0 ; i < digestHeaders . length ; i ++ ) {
Original file line number Diff line number Diff line change 77 class FetchAuth {
88 constructor ( opts ) {
99 // Login to authorize with
10- this . uid = opts . uid ;
10+ this . uid = opts . uid || undefined ;
1111 // Password to authorize with
12- this . passwd = opts . passwd ;
12+ this . passwd = opts . passwd || undefined ;
1313 // Aythentication method: basic, ntlm, digest (lowercase)
14- this . method = opts . method ;
14+ this . method = opts . method || undefined ;
1515 // Optional domain for authentication.
16- this . domain = opts . domain ;
16+ this . domain = opts . domain || undefined ;
1717 // If true it is a proxt authorization.
18- this . proxy = opts . proxy ;
18+ this . proxy = opts . proxy || undefined ;
1919 }
2020
2121 authenticate ( ) {
You can’t perform that action at this time.
0 commit comments