File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -95,9 +95,7 @@ function ClientRequest(options, cb) {
9595 var port = options . port = options . port || defaultPort || 80 ;
9696 var host = options . host = options . hostname || options . host || 'localhost' ;
9797
98- if ( options . setHost === undefined ) {
99- var setHost = true ;
100- }
98+ var setHost = ( options . setHost === undefined ) ;
10199
102100 self . socketPath = options . socketPath ;
103101 self . timeout = options . timeout ;
@@ -126,7 +124,7 @@ function ClientRequest(options, cb) {
126124 if ( ! headersArray ) {
127125 if ( options . headers ) {
128126 var keys = Object . keys ( options . headers ) ;
129- for ( var i = 0 , l = keys . length ; i < l ; i ++ ) {
127+ for ( var i = 0 ; i < keys . length ; i ++ ) {
130128 var key = keys [ i ] ;
131129 self . setHeader ( key , options . headers [ key ] ) ;
132130 }
@@ -152,7 +150,6 @@ function ClientRequest(options, cb) {
152150 }
153151
154152 if ( options . auth && ! this . getHeader ( 'Authorization' ) ) {
155- //basic auth
156153 this . setHeader ( 'Authorization' , 'Basic ' +
157154 Buffer . from ( options . auth ) . toString ( 'base64' ) ) ;
158155 }
You can’t perform that action at this time.
0 commit comments