From 48fdec6bbebc3d048196acb858f3d8961fb81de2 Mon Sep 17 00:00:00 2001 From: James Ross Date: Sun, 22 Dec 2024 15:38:22 +0000 Subject: [PATCH] chore: changeset --- .changeset/empty-cars-provide.md | 5 +++++ packages/workers-shared/asset-worker/tests/handler.test.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/empty-cars-provide.md diff --git a/.changeset/empty-cars-provide.md b/.changeset/empty-cars-provide.md new file mode 100644 index 000000000000..2b6f0d28a121 --- /dev/null +++ b/.changeset/empty-cars-provide.md @@ -0,0 +1,5 @@ +--- +"@cloudflare/workers-shared": patch +--- + +fix: resolves an issue where a malformed path such as `https://example.com/%A0` would cause an unhandled error diff --git a/packages/workers-shared/asset-worker/tests/handler.test.ts b/packages/workers-shared/asset-worker/tests/handler.test.ts index cbfdc75fa31c..f646d5f991a4 100644 --- a/packages/workers-shared/asset-worker/tests/handler.test.ts +++ b/packages/workers-shared/asset-worker/tests/handler.test.ts @@ -162,7 +162,7 @@ describe("[Asset Worker] `handleRequest`", () => { }; const response = await handleRequest( - new Request("https://example.com/%AO"), + new Request("https://example.com/%A0"), configuration, async (pathname: string) => { return assets[pathname] ?? null;