@astrale-os/kernel-server 0.5.0-beta.72 → 0.5.0-beta.73

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.
@@ -4,11 +4,11 @@ import { RequestBodyInvalidError, RequestBodyTooLargeError } from '../../errors/
4
4
  /** Admit a declared length before dispatch and expose one counted, non-buffering body. */
5
5
  export function binaryRequestBody(request, maximumBytes, signal, idle) {
6
6
  const declared = request.headers.get(protocol.http.BINARY_LENGTH_FIELD);
7
- if (declared === null || !/^(?:0|[1-9][0-9]*)$/u.test(declared)) {
7
+ if (declared === null) {
8
8
  throw new RequestBodyInvalidError('Binary request length is required and must be exact.');
9
9
  }
10
- const length = Number(declared);
11
- if (!Number.isSafeInteger(length)) {
10
+ const length = protocol.http.decodeBinaryLength(declared);
11
+ if (length === undefined) {
12
12
  throw new RequestBodyInvalidError('Binary request length is invalid.');
13
13
  }
14
14
  const contentLength = request.headers.get('content-length');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrale-os/kernel-server",
3
- "version": "0.5.0-beta.72",
3
+ "version": "0.5.0-beta.73",
4
4
  "description": "Portable HTTP and WebSocket boundary for Astrale invocation, publication, installation, and issuer protocols",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -33,9 +33,9 @@
33
33
  "access": "public"
34
34
  },
35
35
  "dependencies": {
36
- "@astrale-os/kernel-core": "0.9.0-beta.64",
37
- "@astrale-os/kernel-dsl": "0.2.0-beta.46",
38
- "@astrale-os/kernel-protocol": "0.5.0-beta.70",
36
+ "@astrale-os/kernel-core": "0.9.0-beta.65",
37
+ "@astrale-os/kernel-dsl": "0.2.0-beta.47",
38
+ "@astrale-os/kernel-protocol": "0.5.0-beta.71",
39
39
  "hono": "^4.6.20"
40
40
  },
41
41
  "devDependencies": {