diff --git a/javascript/node/selenium-webdriver/http/index.js b/javascript/node/selenium-webdriver/http/index.js index acb70ec1c7f26..ffe5c971ae37f 100644 --- a/javascript/node/selenium-webdriver/http/index.js +++ b/javascript/node/selenium-webdriver/http/index.js @@ -232,7 +232,7 @@ function sendRequest(options, onOk, onError, opt_data, opt_proxy, opt_retries) { var resp = new httpLib.Response( /** @type {number} */(response.statusCode), /** @type {!Object} */(response.headers), - body.join('').replace(/\0/g, '')); + Buffer.concat(body).toString('utf8').replace(/\0/g, '')); onOk(resp); }); });