kuzzle 2.59.0 → 2.60.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -516,6 +516,18 @@ class HttpWsProtocol extends protocol_1.default {
516
516
  httpReadData(message, response, cb) {
517
517
  let payload = null;
518
518
  response.aborted = false;
519
+ // Beware: the "response" object might be invalidated at any point of time,
520
+ // whenever the connection gets closed by the client for instance
521
+ response.onAborted(() => {
522
+ response.aborted = true;
523
+ });
524
+ // uWS never fires `onData` for an empty body when the request headers
525
+ // span several TCP packets (large headers, e.g. a forwarded client
526
+ // certificate): waiting for it hung the request until the idle timeout.
527
+ if (message.headers["content-length"] === "0") {
528
+ cb();
529
+ return;
530
+ }
519
531
  response.onData((data, isLast) => {
520
532
  const chunk = Buffer.from(data);
521
533
  payload = payload
@@ -551,11 +563,6 @@ class HttpWsProtocol extends protocol_1.default {
551
563
  });
552
564
  return promise;
553
565
  });
554
- // Beware: the "response" object might be invalidated at any point of time,
555
- // whenever the connection gets closed by the client for instance
556
- response.onAborted(() => {
557
- response.aborted = true;
558
- });
559
566
  }
560
567
  async httpParseContent(message, content, cb) {
561
568
  const type = message.headers["content-type"] || "";
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kuzzle",
3
3
  "author": "The Kuzzle Team <support@kuzzle.io>",
4
- "version": "2.59.0",
4
+ "version": "2.60.0-beta.1",
5
5
  "description": "Kuzzle is an open-source solution that handles all the data management through a secured API, with a large choice of protocols.",
6
6
  "scripts": {
7
7
  "build": "rm -Rf ./dist && tsc && node -r ts-node/register/transpile-only ./bin/copy-binaries.ts",
@@ -49,7 +49,7 @@
49
49
  "json2yaml": "1.1.0",
50
50
  "jsonwebtoken": "9.0.3",
51
51
  "koncorde": "4.8.0",
52
- "kuzzle-logger": "1.4.0",
52
+ "kuzzle-logger": "1.5.0",
53
53
  "kuzzle-plugin-auth-passport-local": "6.4.1",
54
54
  "kuzzle-sdk": ">=7.17.1 <8.0.0",
55
55
  "kuzzle-types": "^1.0.0",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kuzzle",
3
3
  "author": "The Kuzzle Team <support@kuzzle.io>",
4
- "version": "2.59.0",
4
+ "version": "2.60.0-beta.1",
5
5
  "description": "Kuzzle is an open-source solution that handles all the data management through a secured API, with a large choice of protocols.",
6
6
  "scripts": {
7
7
  "build": "rm -Rf ./dist && tsc && node -r ts-node/register/transpile-only ./bin/copy-binaries.ts",
@@ -49,7 +49,7 @@
49
49
  "json2yaml": "1.1.0",
50
50
  "jsonwebtoken": "9.0.3",
51
51
  "koncorde": "4.8.0",
52
- "kuzzle-logger": "1.4.0",
52
+ "kuzzle-logger": "1.5.0",
53
53
  "kuzzle-plugin-auth-passport-local": "6.4.1",
54
54
  "kuzzle-sdk": ">=7.17.1 <8.0.0",
55
55
  "kuzzle-types": "^1.0.0",