Skip to content

Commit

Permalink
api/export: calculate content length (elastic#22154) (elastic#22847)
Browse files Browse the repository at this point in the history
  • Loading branch information
epixa committed Sep 8, 2018
1 parent 753cfad commit fbeb05d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core_plugins/kibana/server/routes/api/export/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function exportApi(server) {
reply(json)
.header('Content-Disposition', `attachment; filename="${filename}"`)
.header('Content-Type', 'application/json')
.header('Content-Length', json.length);
.header('Content-Length', Buffer.byteLength(json, 'utf8'));
})
.catch(err => reply(Boom.boomify(err, { statusCode: 400 })));
}
Expand Down

0 comments on commit fbeb05d

Please sign in to comment.