Do not end request for keep-alive connections
Do not end request for keep-alive connections

The request.end(data) line was preempting maintaining a persistent connection, even when Connection: 'keep-alive' was specified. My proposal is to handle the data via the body option, and only end the request when keep-alive is not specified.

diarmaidm/node-soap