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) {
9797 var port = options . port = options . port || defaultPort || 80 ;
9898 var host = options . host = options . hostname || options . host || 'localhost' ;
9999
100- if ( options . setHost === undefined ) {
101- var setHost = true ;
102- }
100+ var setHost = ( options . setHost === undefined ) ;
103101
104102 self . socketPath = options . socketPath ;
105103 self . timeout = options . timeout ;
@@ -128,7 +126,7 @@ function ClientRequest(options, cb) {
128126 if ( ! headersArray ) {
129127 if ( options . headers ) {
130128 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 ++ ) {
132130 var key = keys [ i ] ;
133131 self . setHeader ( key , options . headers [ key ] ) ;
134132 }
@@ -154,7 +152,6 @@ function ClientRequest(options, cb) {
154152 }
155153
156154 if ( options . auth && ! this . getHeader ( 'Authorization' ) ) {
157- //basic auth
158155 this . setHeader ( 'Authorization' , 'Basic ' +
159156 Buffer . from ( options . auth ) . toString ( 'base64' ) ) ;
160157 }
You can’t perform that action at this time.
0 commit comments