kuzzle 2.16.10 → 2.16.11

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.
@@ -76,11 +76,13 @@ const HTTP_ALLOWED_CONTENT_TYPES = [
76
76
  'application/x-www-form-urlencoded',
77
77
  'multipart/form-data',
78
78
  ];
79
+ const HTTP_HEADER_CONNECTION = Buffer.from('Connection');
79
80
  const HTTP_HEADER_CONTENT_LENGTH = Buffer.from('Content-Length');
80
81
  const HTTP_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN = Buffer.from('Access-Control-Allow-Origin');
81
82
  const HTTP_HEADER_VARY = Buffer.from('Vary');
82
83
  const WILDCARD = Buffer.from('*');
83
84
  const ORIGIN = Buffer.from('Origin');
85
+ const CLOSE = Buffer.from('close');
84
86
  const CHARSET_REGEX = /charset=([\w-]+)/i;
85
87
 
86
88
  /**
@@ -594,6 +596,8 @@ class HttpWsProtocol extends Protocol {
594
596
  response.cork(() => {
595
597
  response.writeStatus(Buffer.from(request.response.status.toString()));
596
598
 
599
+ response.writeHeader(HTTP_HEADER_CONNECTION, CLOSE);
600
+
597
601
  for (const header of this.httpConfig.headers) {
598
602
  // If header is missing, add the default one
599
603
  if (request.response.headers[header[2]] === undefined) {
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Internal logger.
3
+ */
4
+ export declare type InternalLogger = {
5
+ /**
6
+ * Logs a debug message
7
+ */
8
+ debug: (message: any) => void;
9
+ /**
10
+ * Logs an error message
11
+ */
12
+ error: (message: any) => void;
13
+ /**
14
+ * Logs an info message
15
+ */
16
+ info: (message: any) => void;
17
+ /**
18
+ * Logs a verbose message
19
+ */
20
+ verbose: (message: any) => void;
21
+ /**
22
+ * Logs a warn message
23
+ */
24
+ warn: (message: any) => void;
25
+ };
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ /*
3
+ * Kuzzle, a backend software, self-hostable and ready to use
4
+ * to power modern apps
5
+ *
6
+ * Copyright 2015-2020 Kuzzle
7
+ * mailto: support AT kuzzle.io
8
+ * website: http://kuzzle.io
9
+ *
10
+ * Licensed under the Apache License, Version 2.0 (the "License");
11
+ * you may not use this file except in compliance with the License.
12
+ * You may obtain a copy of the License at
13
+ *
14
+ * https://www.apache.org/licenses/LICENSE-2.0
15
+ *
16
+ * Unless required by applicable law or agreed to in writing, software
17
+ * distributed under the License is distributed on an "AS IS" BASIS,
18
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ * See the License for the specific language governing permissions and
20
+ * limitations under the License.
21
+ */
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ //# sourceMappingURL=InternalLogger.js.map
package/package-lock.json CHANGED
@@ -2639,12 +2639,6 @@
2639
2639
  "requires": {
2640
2640
  "ansi-regex": "^5.0.1"
2641
2641
  }
2642
- },
2643
- "strip-json-comments": {
2644
- "version": "3.1.1",
2645
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
2646
- "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
2647
- "dev": true
2648
2642
  }
2649
2643
  }
2650
2644
  },
@@ -4729,12 +4723,6 @@
4729
4723
  "ansi-regex": "^5.0.1"
4730
4724
  }
4731
4725
  },
4732
- "strip-json-comments": {
4733
- "version": "3.1.1",
4734
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
4735
- "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
4736
- "dev": true
4737
- },
4738
4726
  "supports-color": {
4739
4727
  "version": "8.1.1",
4740
4728
  "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
@@ -6635,12 +6623,6 @@
6635
6623
  }
6636
6624
  }
6637
6625
  },
6638
- "strip-json-comments": {
6639
- "version": "3.1.1",
6640
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
6641
- "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
6642
- "dev": true
6643
- },
6644
6626
  "supports-color": {
6645
6627
  "version": "5.5.0",
6646
6628
  "resolved": "https://packages.app.kuzzle.io/supports-color/-/supports-color-5.5.0.tgz",
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.16.10",
4
+ "version": "2.16.11",
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
  "bin": {
7
7
  "kuzzle": "bin/start-kuzzle-server"