@litert/televoke 0.4.6 → 0.4.8

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.
Files changed (97) hide show
  1. package/CHANGES.md +8 -0
  2. package/lib/Client/BuiltInRIDGenerator.d.ts +1 -1
  3. package/lib/Client/BuiltInRIDGenerator.d.ts.map +1 -1
  4. package/lib/Client/BuiltInRIDGenerator.js +3 -3
  5. package/lib/Client/BuiltInRIDGenerator.js.map +1 -1
  6. package/lib/Client/Common.d.ts +1 -1
  7. package/lib/Client/Common.js +1 -1
  8. package/lib/Client/Errors.d.ts +1 -1
  9. package/lib/Client/Errors.js +1 -1
  10. package/lib/Client/HttpClient.d.ts +7 -1
  11. package/lib/Client/HttpClient.d.ts.map +1 -1
  12. package/lib/Client/HttpClient.js +29 -8
  13. package/lib/Client/HttpClient.js.map +1 -1
  14. package/lib/Client/HttpsClient.d.ts +7 -1
  15. package/lib/Client/HttpsClient.d.ts.map +1 -1
  16. package/lib/Client/HttpsClient.js +29 -8
  17. package/lib/Client/HttpsClient.js.map +1 -1
  18. package/lib/Client/TCPClient.d.ts +1 -1
  19. package/lib/Client/TCPClient.js +1 -1
  20. package/lib/Client/TLSClient.d.ts +1 -1
  21. package/lib/Client/TLSClient.js +1 -1
  22. package/lib/Client/index.d.ts +1 -1
  23. package/lib/Client/index.js +1 -1
  24. package/lib/Common/API.d.ts +1 -1
  25. package/lib/Common/API.js +1 -1
  26. package/lib/Common/Encoding.d.ts +1 -1
  27. package/lib/Common/Encoding.js +1 -1
  28. package/lib/Common/Request.d.ts +1 -1
  29. package/lib/Common/Request.js +1 -1
  30. package/lib/Common/Response.d.ts +1 -1
  31. package/lib/Common/Response.js +1 -1
  32. package/lib/Common/index.d.ts +1 -1
  33. package/lib/Common/index.js +1 -1
  34. package/lib/Encoder/Decoder.d.ts +1 -1
  35. package/lib/Encoder/Decoder.js +1 -1
  36. package/lib/Encoder/Encoder.d.ts +1 -1
  37. package/lib/Encoder/Encoder.js +1 -1
  38. package/lib/Encoder/Errors.d.ts +1 -1
  39. package/lib/Encoder/Errors.js +1 -1
  40. package/lib/Errors.d.ts +1 -1
  41. package/lib/Errors.js +1 -1
  42. package/lib/Server/Common/Gateway.d.ts +1 -1
  43. package/lib/Server/Common/Gateway.js +1 -1
  44. package/lib/Server/Common/Request.d.ts +1 -1
  45. package/lib/Server/Common/Request.js +1 -1
  46. package/lib/Server/Common/Router.d.ts +1 -1
  47. package/lib/Server/Common/Router.js +1 -1
  48. package/lib/Server/Common/Server.d.ts +1 -1
  49. package/lib/Server/Common/Server.js +1 -1
  50. package/lib/Server/Common/index.d.ts +1 -1
  51. package/lib/Server/Common/index.js +1 -1
  52. package/lib/Server/Errors.d.ts +1 -1
  53. package/lib/Server/Errors.js +1 -1
  54. package/lib/Server/Gateways/Http.d.ts +1 -1
  55. package/lib/Server/Gateways/Http.d.ts.map +1 -1
  56. package/lib/Server/Gateways/Http.js +5 -1
  57. package/lib/Server/Gateways/Http.js.map +1 -1
  58. package/lib/Server/Gateways/TCP.d.ts +1 -1
  59. package/lib/Server/Gateways/TCP.js +1 -1
  60. package/lib/Server/Server.d.ts +1 -1
  61. package/lib/Server/Server.js +1 -1
  62. package/lib/Server/SimpleRouter.d.ts +1 -1
  63. package/lib/Server/SimpleRouter.js +1 -1
  64. package/lib/Server/index.d.ts +1 -1
  65. package/lib/Server/index.js +1 -1
  66. package/lib/index.d.ts +1 -1
  67. package/lib/index.js +1 -1
  68. package/package.json +1 -1
  69. package/src/lib/Client/BuiltInRIDGenerator.ts +1 -1
  70. package/src/lib/Client/Common.ts +1 -1
  71. package/src/lib/Client/Errors.ts +1 -1
  72. package/src/lib/Client/HttpClient.ts +45 -8
  73. package/src/lib/Client/HttpsClient.ts +45 -8
  74. package/src/lib/Client/TCPClient.ts +1 -1
  75. package/src/lib/Client/TLSClient.ts +1 -1
  76. package/src/lib/Client/index.ts +1 -1
  77. package/src/lib/Common/API.ts +1 -1
  78. package/src/lib/Common/Encoding.ts +1 -1
  79. package/src/lib/Common/Request.ts +1 -1
  80. package/src/lib/Common/Response.ts +1 -1
  81. package/src/lib/Common/index.ts +1 -1
  82. package/src/lib/Encoder/Decoder.ts +1 -1
  83. package/src/lib/Encoder/Encoder.ts +1 -1
  84. package/src/lib/Encoder/Errors.ts +1 -1
  85. package/src/lib/Errors.ts +1 -1
  86. package/src/lib/Server/Common/Gateway.ts +1 -1
  87. package/src/lib/Server/Common/Request.ts +1 -1
  88. package/src/lib/Server/Common/Router.ts +1 -1
  89. package/src/lib/Server/Common/Server.ts +1 -1
  90. package/src/lib/Server/Common/index.ts +1 -1
  91. package/src/lib/Server/Errors.ts +1 -1
  92. package/src/lib/Server/Gateways/Http.ts +7 -1
  93. package/src/lib/Server/Gateways/TCP.ts +1 -1
  94. package/src/lib/Server/Server.ts +1 -1
  95. package/src/lib/Server/SimpleRouter.ts +1 -1
  96. package/src/lib/Server/index.ts +1 -1
  97. package/src/lib/index.ts +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
3
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License");
6
6
  * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1 +1 @@
1
- {"version":3,"file":"Http.d.ts","sourceRoot":"","sources":["../../../src/lib/Server/Gateways/Http.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,CAAC,MAAM,WAAW,CAAC;AAsL/B,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,QAAQ,CAG1F"}
1
+ {"version":3,"file":"Http.d.ts","sourceRoot":"","sources":["../../../src/lib/Server/Gateways/Http.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,CAAC,MAAM,WAAW,CAAC;AA4L/B,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,QAAQ,CAG1F"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
3
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License");
6
6
  * you may not use this file except in compliance with the License.
@@ -73,6 +73,10 @@ class HttpGateway {
73
73
  chunk.copy(buf, index);
74
74
  }).on('end', () => {
75
75
  let input;
76
+ if (offset !== length || buf[0] !== 123 || buf[offset - 1] !== 125) {
77
+ refuseBadRequest(resp);
78
+ return;
79
+ }
76
80
  try {
77
81
  input = JSON.parse(buf);
78
82
  input.ip = req.socket.address().address;
@@ -1 +1 @@
1
- {"version":3,"file":"Http.js","sourceRoot":"","sources":["../../../src/lib/Server/Gateways/Http.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIH,kCAAkC;AAClC,+BAA+B;AAC/B,8BAA8B;AAE9B,IAAK,OAMJ;AAND,WAAK,OAAO;IAER,qCAAI,CAAA;IACJ,6CAAQ,CAAA;IACR,2CAAO,CAAA;IACP,2CAAO,CAAA;AACX,CAAC,EANI,OAAO,KAAP,OAA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C,CAAC;gBACX,CAAC,CAAC,CAAC;YAEP,KAAK,OAAO,CAAC,QAAQ;gBACjB,MAAM,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;YACrC,KAAK,OAAO,CAAC,OAAO;gBAChB,MAAM,IAAI,CAAC,CAAC,iBAAiB,EAAE,CAAC;YACpC,KAAK,OAAO,CAAC,OAAO;gBAChB,OAAO;SACd;IACL,CAAC;IAEM,KAAK,CAAC,KAAK;QAEd,QAAQ,IAAI,CAAC,OAAO,EAAE;YAElB,KAAK,OAAO,CAAC,IAAI;gBACb,OAAO;YACX,KAAK,OAAO,CAAC,QAAQ;gBACjB,MAAM,IAAI,CAAC,CAAC,kBAAkB,EAAE,CAAC;YACrC,KAAK,OAAO,CAAC,OAAO;gBAChB,MAAM,IAAI,CAAC,CAAC,iBAAiB,EAAE,CAAC;YACpC,KAAK,OAAO,CAAC,OAAO;gBAChB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;oBAE3B,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC7C,CAAC,CAAC,CAAC;SACV;IACL,CAAC;CACJ;AAED,SAAgB,iBAAiB,CAAC,IAAY,EAAE,IAAY,EAAE,OAAgB;IAE1E,OAAO,IAAI,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;AAChD,CAAC;AAHD,8CAGC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
3
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License");
6
6
  * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
3
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License");
6
6
  * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
3
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License");
6
6
  * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
3
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License");
6
6
  * you may not use this file except in compliance with the License.
package/lib/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
package/lib/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
3
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License");
6
6
  * you may not use this file except in compliance with the License.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@litert/televoke",
3
- "version": "0.4.6",
3
+ "version": "0.4.8",
4
4
  "description": "A simple RPC service framework.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -1,6 +1,6 @@
1
1
  import * as C from './Common';
2
2
 
3
- export function createIncreasementRIDGenerator(base: number): C.IRIDGenerator {
3
+ export function createIncrementRIDGenerator(base: number): C.IRIDGenerator {
4
4
 
5
5
  return () => base++;
6
6
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -33,7 +33,8 @@ class HttpClient extends Events.EventEmitter<Events.ICallbackDefinitions> implem
33
33
  private readonly _ridGenerator: C.IRIDGenerator,
34
34
  private readonly _path: string = '/',
35
35
  private readonly _timeout: number = 30000,
36
- private readonly _apiNameWrapper?: (name: string) => string
36
+ private readonly _apiNameWrapper?: (name: string) => string,
37
+ private readonly _retryConnReset?: boolean,
37
38
  ) {
38
39
 
39
40
  super();
@@ -41,18 +42,46 @@ class HttpClient extends Events.EventEmitter<Events.ICallbackDefinitions> implem
41
42
  this._agent = new $Http.Agent({
42
43
  maxSockets: 0,
43
44
  keepAlive: true,
44
- keepAliveMsecs: 30000
45
+ keepAliveMsecs: this._timeout
45
46
  });
46
47
  }
47
48
 
48
- public invoke(api: any, ...args: any[]): Promise<any> {
49
+ public async invoke(api: any, ...args: any[]): Promise<any> {
49
50
 
50
- return this._call(api, false, args);
51
+ try {
52
+
53
+ return await this._call(api, false, args);
54
+ }
55
+ catch (e) {
56
+
57
+ if (this._retryConnReset && (e as any)?.code === 'ECONNRESET') {
58
+
59
+ return this._call(api, false, args);
60
+ }
61
+ else {
62
+
63
+ throw e;
64
+ }
65
+ }
51
66
  }
52
67
 
53
- public call(api: any, ...args: any[]): Promise<any> {
68
+ public async call(api: any, ...args: any[]): Promise<any> {
69
+
70
+ try {
71
+
72
+ return await this._call(api, true, args);
73
+ }
74
+ catch (e) {
54
75
 
55
- return this._call(api, true, args);
76
+ if (this._retryConnReset && (e as any)?.code === 'ECONNRESET') {
77
+
78
+ return this._call(api, true, args);
79
+ }
80
+ else {
81
+
82
+ throw e;
83
+ }
84
+ }
56
85
  }
57
86
 
58
87
  private _call(api: any, returnRaw: boolean, args: any[]): Promise<any> {
@@ -217,6 +246,13 @@ export interface IHttpClientOptions {
217
246
  timeout?: number;
218
247
 
219
248
  apiNameWrapper?: (name: string) => string;
249
+
250
+ /**
251
+ * Whether to retry when the connection is reset.
252
+ *
253
+ * @default false
254
+ */
255
+ retryConnReset?: boolean;
220
256
  }
221
257
 
222
258
  export function createHttpClient<TAPIs extends G.IServiceAPIs>(opts: IHttpClientOptions): C.IClient<TAPIs> {
@@ -227,6 +263,7 @@ export function createHttpClient<TAPIs extends G.IServiceAPIs>(opts: IHttpClient
227
263
  opts.ridGenerator,
228
264
  opts.path,
229
265
  opts.timeout,
230
- opts.apiNameWrapper
266
+ opts.apiNameWrapper,
267
+ opts.retryConnReset,
231
268
  );
232
269
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -34,7 +34,8 @@ class HttpsClient extends Events.EventEmitter<Events.ICallbackDefinitions> imple
34
34
  private readonly _path: string = '',
35
35
  private readonly _timeout: number = 30000,
36
36
  private readonly _apiNameWrapper?: (name: string) => string,
37
- tlsAgentOptions?: $Https.AgentOptions
37
+ tlsAgentOptions?: $Https.AgentOptions,
38
+ private readonly _retryConnReset?: boolean,
38
39
  ) {
39
40
 
40
41
  super();
@@ -42,20 +43,48 @@ class HttpsClient extends Events.EventEmitter<Events.ICallbackDefinitions> imple
42
43
  this._agent = new $Https.Agent({
43
44
  maxSockets: 0,
44
45
  keepAlive: true,
45
- keepAliveMsecs: 30000,
46
+ keepAliveMsecs: this._timeout,
46
47
  // servername: _host,
47
48
  ...tlsAgentOptions
48
49
  });
49
50
  }
50
51
 
51
- public invoke(api: any, ...args: any[]): Promise<any> {
52
+ public async invoke(api: any, ...args: any[]): Promise<any> {
52
53
 
53
- return this._call(api, false, args);
54
+ try {
55
+
56
+ return await this._call(api, false, args);
57
+ }
58
+ catch (e) {
59
+
60
+ if (this._retryConnReset && (e as any)?.code === 'ECONNRESET') {
61
+
62
+ return this._call(api, false, args);
63
+ }
64
+ else {
65
+
66
+ throw e;
67
+ }
68
+ }
54
69
  }
55
70
 
56
- public call(api: any, ...args: any[]): Promise<any> {
71
+ public async call(api: any, ...args: any[]): Promise<any> {
72
+
73
+ try {
74
+
75
+ return await this._call(api, true, args);
76
+ }
77
+ catch (e) {
57
78
 
58
- return this._call(api, true, args);
79
+ if (this._retryConnReset && (e as any)?.code === 'ECONNRESET') {
80
+
81
+ return this._call(api, true, args);
82
+ }
83
+ else {
84
+
85
+ throw e;
86
+ }
87
+ }
59
88
  }
60
89
 
61
90
  private _call(api: any, returnRaw: boolean, args: any[]): Promise<any> {
@@ -222,6 +251,13 @@ export interface IHttpsClientOptions {
222
251
  apiNameWrapper?: (name: string) => string;
223
252
 
224
253
  tlsAgentOptions?: $Https.AgentOptions;
254
+
255
+ /**
256
+ * Whether to retry when the connection is reset.
257
+ *
258
+ * @default false
259
+ */
260
+ retryConnReset?: boolean;
225
261
  }
226
262
 
227
263
  export function createHttpsClient<TAPIs extends G.IServiceAPIs>(opts: IHttpsClientOptions): C.IClient<TAPIs> {
@@ -233,6 +269,7 @@ export function createHttpsClient<TAPIs extends G.IServiceAPIs>(opts: IHttpsClie
233
269
  opts.path,
234
270
  opts.timeout,
235
271
  opts.apiNameWrapper,
236
- opts.tlsAgentOptions
272
+ opts.tlsAgentOptions,
273
+ opts.retryConnReset,
237
274
  );
238
275
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
package/src/lib/Errors.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -107,6 +107,12 @@ class HttpGateway implements C.IGateway {
107
107
 
108
108
  let input: any;
109
109
 
110
+ if (offset !== length || buf[0] !== 123 || buf[offset - 1] !== 125) {
111
+
112
+ refuseBadRequest(resp);
113
+ return;
114
+ }
115
+
110
116
  try {
111
117
 
112
118
  input = JSON.parse(buf as any);
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
package/src/lib/index.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2021 Angus.Fenying <fenying@litert.org>
2
+ * Copyright 2023 Angus.Fenying <fenying@litert.org>
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.