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 @@ -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 ;
@@ -117,7 +115,7 @@ function ClientRequest(options, cb) {
117
115
if ( ! headersArray ) {
118
116
if ( options . headers ) {
119
117
var keys = Object . keys ( options . headers ) ;
120
- for ( var i = 0 , l = keys . length ; i < l ; i ++ ) {
118
+ for ( var i = 0 ; i < keys . length ; i ++ ) {
121
119
var key = keys [ i ] ;
122
120
self . setHeader ( key , options . headers [ key ] ) ;
123
121
}
@@ -143,7 +141,6 @@ function ClientRequest(options, cb) {
143
141
}
144
142
145
143
if ( options . auth && ! this . getHeader ( 'Authorization' ) ) {
146
- //basic auth
147
144
this . setHeader ( 'Authorization' , 'Basic ' +
148
145
Buffer . from ( options . auth ) . toString ( 'base64' ) ) ;
149
146
}
You can’t perform that action at this time.
0 commit comments