@@ -28,7 +28,7 @@ function HttpsProxyAgent (opts) {
2828 if ( ! ( this instanceof HttpsProxyAgent ) ) return new HttpsProxyAgent ( opts ) ;
2929 if ( 'string' == typeof opts ) opts = url . parse ( opts ) ;
3030 if ( ! opts ) throw new Error ( 'an HTTP(S) proxy server `host` and `port` must be specified!' ) ;
31- debug ( 'creating new HttpsProxyAgent instance: %j ' , opts ) ;
31+ debug ( 'creating new HttpsProxyAgent instance: %o ' , opts ) ;
3232 Agent . call ( this , connect ) ;
3333
3434 var proxy = extend ( { } , opts ) ;
@@ -113,7 +113,7 @@ function connect (req, _opts, fn) {
113113 }
114114
115115 function onclose ( err ) {
116- debug ( 'onclose had error' , err ) ;
116+ debug ( 'onclose had error %o ' , err ) ;
117117 }
118118
119119 function onend ( ) {
@@ -144,9 +144,7 @@ function connect (req, _opts, fn) {
144144
145145 var firstLine = str . substring ( 0 , str . indexOf ( '\r\n' ) ) ;
146146 var statusCode = + firstLine . split ( ' ' ) [ 1 ] ;
147- debug ( 'got proxy server response: "%s"' , firstLine ) ;
148- //console.log('statusCode: %d', statusCode);
149- //console.log(b.length, b, b.toString());
147+ debug ( 'got proxy server response: %o' , firstLine ) ;
150148
151149 if ( 200 == statusCode ) {
152150 // 200 Connected status code!
@@ -158,7 +156,7 @@ function connect (req, _opts, fn) {
158156 if ( secureEndpoint ) {
159157 // since the proxy is connecting to an SSL server, we have
160158 // to upgrade this socket connection to an SSL connection
161- debug ( 'upgrading proxy-connected socket to TLS connection: "%s" ' , opts . host ) ;
159+ debug ( 'upgrading proxy-connected socket to TLS connection: %o ' , opts . host ) ;
162160 opts . socket = socket ;
163161 opts . servername = opts . host ;
164162 opts . host = null ;
0 commit comments