File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ class Service extends HttpDuplex {
58
58
if ( req . headers [ "authorization" ] ) {
59
59
const tokens = req . headers [ "authorization" ] . split ( " " ) ;
60
60
if ( tokens [ 0 ] === "Basic" ) {
61
- const splitHash = new Buffer . from ( tokens [ 1 ] , 'base64' ) . toString ( 'utf8' ) . split ( ":" ) ;
61
+ const splitHash = Buffer . from ( tokens [ 1 ] , 'base64' ) . toString ( 'utf8' ) . split ( ":" ) ;
62
62
this . username = splitHash . shift ( ) ;
63
63
}
64
64
}
@@ -141,7 +141,7 @@ class Service extends HttpDuplex {
141
141
} ;
142
142
143
143
self . emit ( 'response' , respStream , function endResponse ( ) {
144
- res . queue ( new Buffer . from ( '0000' ) ) ;
144
+ res . queue ( Buffer . from ( '0000' ) ) ;
145
145
res . queue ( null ) ;
146
146
} ) ;
147
147
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ const Util = {
34
34
} else {
35
35
const tokens = req . headers [ "authorization" ] . split ( " " ) ;
36
36
if ( tokens [ 0 ] === "Basic" ) {
37
- const splitHash = new Buffer . from ( tokens [ 1 ] , 'base64' ) . toString ( 'utf8' ) . split ( ":" ) ;
37
+ const splitHash = Buffer . from ( tokens [ 1 ] , 'base64' ) . toString ( 'utf8' ) . split ( ":" ) ;
38
38
const username = splitHash . shift ( ) ;
39
39
const password = splitHash . join ( ":" ) ;
40
40
callback ( username , password , null ) ;
You can’t perform that action at this time.
0 commit comments