File tree 1 file changed +2
-5
lines changed
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) {
95
95
var port = options . port = options . port || defaultPort || 80 ;
96
96
var host = options . host = options . hostname || options . host || 'localhost' ;
97
97
98
- if ( options . setHost === undefined ) {
99
- var setHost = true ;
100
- }
98
+ var setHost = ( options . setHost === undefined ) ;
101
99
102
100
self . socketPath = options . socketPath ;
103
101
self . timeout = options . timeout ;
@@ -126,7 +124,7 @@ function ClientRequest(options, cb) {
126
124
if ( ! headersArray ) {
127
125
if ( options . headers ) {
128
126
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 ++ ) {
130
128
var key = keys [ i ] ;
131
129
self . setHeader ( key , options . headers [ key ] ) ;
132
130
}
@@ -152,7 +150,6 @@ function ClientRequest(options, cb) {
152
150
}
153
151
154
152
if ( options . auth && ! this . getHeader ( 'Authorization' ) ) {
155
- //basic auth
156
153
this . setHeader ( 'Authorization' , 'Basic ' +
157
154
Buffer . from ( options . auth ) . toString ( 'base64' ) ) ;
158
155
}
You can’t perform that action at this time.
0 commit comments