File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ var http = require ( 'http' ) ;
2+ var https = require ( 'https' ) ;
13var common = require ( '../common' ) ;
24var assert = common . assert ;
35var FormData = require ( common . dir . lib + '/form_data' ) ;
@@ -13,13 +15,13 @@ form.append('field', 'value');
1315// Basic parsing
1416req = form . submit ( 'http://localhost:' + common . port + '/path' , function ( ) { } ) ;
1517assert . strictEqual ( req . path , '/path' ) ;
16- assert . strictEqual ( req . agent . protocol , 'http: ' ) ;
18+ assert . ok ( req . agent instanceof http . Agent , 'req.agent instanceof http.Agent ' ) ;
1719assert . strictEqual ( req . getHeader ( 'Host' ) , 'localhost:' + common . port ) ;
1820req . abort ( ) ;
1921
2022// HTTPS protocol handling
2123req = form . submit ( 'https://localhost:' + common . port + '/path' , function ( ) { } ) ;
22- assert . strictEqual ( req . agent . protocol , 'https: ' ) ;
24+ assert . ok ( req . agent instanceof https . Agent , 'req.agent instanceof https.Agent ' ) ;
2325req . abort ( ) ;
2426
2527
You can’t perform that action at this time.
0 commit comments