THRIFT-2998: enable cross test for nodejs http transport,
fix missing apache license headers in nodejs
Client: nodejs
This closes #1403
diff --git a/lib/nodejs/test/server.js b/lib/nodejs/test/server.js
index 6e5cdfa..bad3b17 100644
--- a/lib/nodejs/test/server.js
+++ b/lib/nodejs/test/server.js
@@ -32,12 +32,12 @@
var ttypes = require('./gen-nodejs/ThriftTest_types');
program
- .option('-p, --protocol <protocol>', 'Set thrift protocol (binary|json|compact)', 'binary')
- .option('-t, --transport <transport>', 'Set thrift transport (buffered|framed)', 'buffered')
+ .option('-p, --protocol <protocol>', 'Set thrift protocol (binary|compact|json)', 'binary')
+ .option('-t, --transport <transport>', 'Set thrift transport (buffered|framed|http)', 'buffered')
.option('--ssl', 'use ssl transport')
.option('--port <port>', 'Set thrift server port', 9090)
.option('--promise', 'test with promise style functions')
- .option('-t, --type <type>', 'Select server type (tcp|multiplex|http)', 'tcp')
+ .option('-t, --type <type>', 'Select server type (http|multiplex|tcp|websocket)', 'tcp')
.parse(process.argv);
var port = program.port;
@@ -47,6 +47,11 @@
var handler = program.promise ? ThriftTestHandler : ThriftTestHandlerPromise;
+if (program.transport === 'http') {
+ program.transport = 'buffered';
+ type = 'http';
+}
+
var options = {
transport: helpers.transports[program.transport],
protocol: helpers.protocols[program.protocol]