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 @@ -97,9 +97,7 @@ function ClientRequest(options, cb) {
97
97
var port = options . port = options . port || defaultPort || 80 ;
98
98
var host = options . host = options . hostname || options . host || 'localhost' ;
99
99
100
- if ( options . setHost === undefined ) {
101
- var setHost = true ;
102
- }
100
+ var setHost = ( options . setHost === undefined ) ;
103
101
104
102
self . socketPath = options . socketPath ;
105
103
self . timeout = options . timeout ;
@@ -128,7 +126,7 @@ function ClientRequest(options, cb) {
128
126
if ( ! headersArray ) {
129
127
if ( options . headers ) {
130
128
var keys = Object . keys ( options . headers ) ;
131
- for ( var i = 0 , l = keys . length ; i < l ; i ++ ) {
129
+ for ( var i = 0 ; i < keys . length ; i ++ ) {
132
130
var key = keys [ i ] ;
133
131
self . setHeader ( key , options . headers [ key ] ) ;
134
132
}
@@ -154,7 +152,6 @@ function ClientRequest(options, cb) {
154
152
}
155
153
156
154
if ( options . auth && ! this . getHeader ( 'Authorization' ) ) {
157
- //basic auth
158
155
this . setHeader ( 'Authorization' , 'Basic ' +
159
156
Buffer . from ( options . auth ) . toString ( 'base64' ) ) ;
160
157
}
You can’t perform that action at this time.
0 commit comments