From c865b8aecdb2dfe011c44944282d852de84031b3 Mon Sep 17 00:00:00 2001 From: Dirk Stolle Date: Wed, 29 Nov 2023 23:45:35 +0100 Subject: [PATCH] fix bug in handling of unusually large payloads --- changelog.md | 5 +++++ export-server/package-lock.json | 2 +- export-server/package.json | 2 +- export-server/server.js | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index ff3464b..3ca24e5 100644 --- a/changelog.md +++ b/changelog.md @@ -10,6 +10,11 @@ Since [ECharts](https://echarts.apache.org/) is the main dependency of this application, major version changes in ECharts will also trigger a major version change in this application. +## Version 5.0.11 (2023-11-29) + +* __[bug fix]__ +Fix error in handling of unusually large payloads. + ## Version 5.0.10 (2023-09-15) * __[maintenance]__ diff --git a/export-server/package-lock.json b/export-server/package-lock.json index 215f422..a5042b0 100644 --- a/export-server/package-lock.json +++ b/export-server/package-lock.json @@ -1,6 +1,6 @@ { "name": "echarts-node-export-server", - "version": "5.0.10", + "version": "5.0.11", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/export-server/package.json b/export-server/package.json index 75f9a98..01ef3d3 100644 --- a/export-server/package.json +++ b/export-server/package.json @@ -1,6 +1,6 @@ { "name": "echarts-node-export-server", - "version": "5.0.10", + "version": "5.0.11", "description": "ECharts Node.js export server", "repository": { "url": "https://gitlab.com/striezel/echarts-node-export-server.git", diff --git a/export-server/server.js b/export-server/server.js index 57a76ab..aba65b6 100644 --- a/export-server/server.js +++ b/export-server/server.js @@ -73,7 +73,7 @@ const server = http.createServer(function(req, res) { res.statusCode = 413; // 413 == Payload Too Large res.setHeader('Content-Type', 'text/plain'); res.end('Request size exceeds reasonable limits!\n'); - req.connecion.destroy(); + req.connection.destroy(); killed = true; return; }